From 7ff964fc372457a20c7e3abb57679a083ed9ca3b Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Mon, 4 Dec 2017 16:40:46 -0800 Subject: [PATCH] 2016-08: Retroactive Updates * Added installers and updated diagnostics --- .bin/Scripts/diagnostics | 4 +- .gitignore | 1 + Diagnostics/Disk Inventory X.command | 2 +- Enable TRIM.command | 2 +- Installers/BackBlaze.url | 5 ++ .../Extras/Audio-Video/HandBrake.command | 80 +++++++++++++++++ Installers/Extras/Audio-Video/Spotify.command | 80 +++++++++++++++++ Installers/Extras/Audio-Video/VLC.command | 80 +++++++++++++++++ Installers/Extras/Audio-Video/mpv.command | 80 +++++++++++++++++ .../Extras/Browsers/Chrome & Firefox.command | 81 +++++++++++++++++ Installers/Extras/Browsers/Chrome.command | 80 +++++++++++++++++ Installers/Extras/Browsers/Firefox.command | 80 +++++++++++++++++ Installers/Extras/Browsers/Opera.command | 80 +++++++++++++++++ Installers/Extras/Caffeine.command | 80 +++++++++++++++++ Installers/Extras/Calibre.command | 80 +++++++++++++++++ Installers/Extras/Cloud/Dropbox.command | 80 +++++++++++++++++ Installers/Extras/Cloud/Evernote.command | 80 +++++++++++++++++ Installers/Extras/Cloud/Google Drive.command | 80 +++++++++++++++++ Installers/Extras/Cloud/KeePassX.command | 80 +++++++++++++++++ Installers/Extras/Cloud/OmniFocus.command | 80 +++++++++++++++++ Installers/Extras/Cloud/Tunnelblick.command | 80 +++++++++++++++++ Installers/Extras/Communication/Adium.command | 80 +++++++++++++++++ Installers/Extras/Communication/Skype.command | 80 +++++++++++++++++ Installers/Extras/Communication/Slack.command | 80 +++++++++++++++++ Installers/Extras/Compression/Keka.command | 80 +++++++++++++++++ .../Extras/Compression/The Unarchiver.command | 80 +++++++++++++++++ Installers/Extras/DiskMaker X.command | 80 +++++++++++++++++ Installers/Extras/FileZilla.command | 80 +++++++++++++++++ Installers/Extras/Google Earth.command | 80 +++++++++++++++++ Installers/Extras/Image-Photo/Flux.command | 80 +++++++++++++++++ Installers/Extras/Image-Photo/GIMP.command | 80 +++++++++++++++++ .../Extras/Image-Photo/Inkscape.command | 80 +++++++++++++++++ Installers/Extras/Office/LibreOffice.command | 80 +++++++++++++++++ Installers/Extras/Office/OpenOffice.command | 80 +++++++++++++++++ Installers/Extras/Office/Thunderbird.command | 80 +++++++++++++++++ .../Extras/Security/BitDefender ART.command | 80 +++++++++++++++++ .../Extras/Security/Malwarebytes.command | 80 +++++++++++++++++ Installers/Extras/Steam.command | 80 +++++++++++++++++ Installers/Extras/TeamViewerQS.command | 80 +++++++++++++++++ Installers/Extras/iTerm2.command | 80 +++++++++++++++++ Installers/OS X.command | 87 +++++++++++++++++++ OSR & VR/Malwarebytes.command | 80 +++++++++++++++++ SW Diagnostics.command | 2 +- 43 files changed, 2979 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 Installers/BackBlaze.url create mode 100644 Installers/Extras/Audio-Video/HandBrake.command create mode 100644 Installers/Extras/Audio-Video/Spotify.command create mode 100644 Installers/Extras/Audio-Video/VLC.command create mode 100644 Installers/Extras/Audio-Video/mpv.command create mode 100644 Installers/Extras/Browsers/Chrome & Firefox.command create mode 100644 Installers/Extras/Browsers/Chrome.command create mode 100644 Installers/Extras/Browsers/Firefox.command create mode 100644 Installers/Extras/Browsers/Opera.command create mode 100644 Installers/Extras/Caffeine.command create mode 100644 Installers/Extras/Calibre.command create mode 100644 Installers/Extras/Cloud/Dropbox.command create mode 100644 Installers/Extras/Cloud/Evernote.command create mode 100644 Installers/Extras/Cloud/Google Drive.command create mode 100644 Installers/Extras/Cloud/KeePassX.command create mode 100644 Installers/Extras/Cloud/OmniFocus.command create mode 100644 Installers/Extras/Cloud/Tunnelblick.command create mode 100644 Installers/Extras/Communication/Adium.command create mode 100644 Installers/Extras/Communication/Skype.command create mode 100644 Installers/Extras/Communication/Slack.command create mode 100644 Installers/Extras/Compression/Keka.command create mode 100644 Installers/Extras/Compression/The Unarchiver.command create mode 100644 Installers/Extras/DiskMaker X.command create mode 100644 Installers/Extras/FileZilla.command create mode 100644 Installers/Extras/Google Earth.command create mode 100644 Installers/Extras/Image-Photo/Flux.command create mode 100644 Installers/Extras/Image-Photo/GIMP.command create mode 100644 Installers/Extras/Image-Photo/Inkscape.command create mode 100644 Installers/Extras/Office/LibreOffice.command create mode 100644 Installers/Extras/Office/OpenOffice.command create mode 100644 Installers/Extras/Office/Thunderbird.command create mode 100644 Installers/Extras/Security/BitDefender ART.command create mode 100644 Installers/Extras/Security/Malwarebytes.command create mode 100644 Installers/Extras/Steam.command create mode 100644 Installers/Extras/TeamViewerQS.command create mode 100644 Installers/Extras/iTerm2.command create mode 100644 Installers/OS X.command create mode 100644 OSR & VR/Malwarebytes.command diff --git a/.bin/Scripts/diagnostics b/.bin/Scripts/diagnostics index 1322d587..00fb77b1 100644 --- a/.bin/Scripts/diagnostics +++ b/.bin/Scripts/diagnostics @@ -1,5 +1,5 @@ #!/bin/bash -# Wizard Kit: SW Diagnostics +## Wizard Kit: SW Diagnostics # Init ## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) @@ -10,7 +10,7 @@ popd > /dev/null DATE="$(date "+%F")" LOG_DIR="/WK/Info" LOG_FILE="${LOG_DIR}/${DATE}/Diagnostics.log" -mkdir -p "${LOG_DIR}" 2>/dev/null +mkdir -p "$(dirname "${LOG_FILE}")" 2>/dev/null # . "$BIN/os_check" # Setup color and message printing diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Diagnostics/Disk Inventory X.command b/Diagnostics/Disk Inventory X.command index 508736a7..03245940 100644 --- a/Diagnostics/Disk Inventory X.command +++ b/Diagnostics/Disk Inventory X.command @@ -1,5 +1,5 @@ #!/bin/bash -# Wizard Kit: Generic app launcher +## Wizard Kit: Generic app launcher # Init ## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) diff --git a/Enable TRIM.command b/Enable TRIM.command index 6ca34bc7..bc17d417 100644 --- a/Enable TRIM.command +++ b/Enable TRIM.command @@ -1,5 +1,5 @@ #!/bin/bash -# Wizard Kit: Enable TRIM +## Wizard Kit: Enable TRIM # Run trimforce sudo trimforce enable diff --git a/Installers/BackBlaze.url b/Installers/BackBlaze.url new file mode 100644 index 00000000..91c2969e --- /dev/null +++ b/Installers/BackBlaze.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +URL=https://www.backblaze.com/gen/install_backblaze +IDList= diff --git a/Installers/Extras/Audio-Video/HandBrake.command b/Installers/Extras/Audio-Video/HandBrake.command new file mode 100644 index 00000000..d2e66524 --- /dev/null +++ b/Installers/Extras/Audio-Video/HandBrake.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "HandBrake" "HandBrake.app" "http://downloads.sourceforge.net/project/handbrake/0.10.5/HandBrake-0.10.5-MacOSX.6_GUI_x86_64.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Audio-Video/Spotify.command b/Installers/Extras/Audio-Video/Spotify.command new file mode 100644 index 00000000..b5d99d0e --- /dev/null +++ b/Installers/Extras/Audio-Video/Spotify.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Audio-Video/VLC.command b/Installers/Extras/Audio-Video/VLC.command new file mode 100644 index 00000000..bc53b410 --- /dev/null +++ b/Installers/Extras/Audio-Video/VLC.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Audio-Video/mpv.command b/Installers/Extras/Audio-Video/mpv.command new file mode 100644 index 00000000..240eefa1 --- /dev/null +++ b/Installers/Extras/Audio-Video/mpv.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Browsers/Chrome & Firefox.command b/Installers/Extras/Browsers/Chrome & Firefox.command new file mode 100644 index 00000000..56aabcba --- /dev/null +++ b/Installers/Extras/Browsers/Chrome & Firefox.command @@ -0,0 +1,81 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" "" +installApp "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Browsers/Chrome.command b/Installers/Extras/Browsers/Chrome.command new file mode 100644 index 00000000..1ab304de --- /dev/null +++ b/Installers/Extras/Browsers/Chrome.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Browsers/Firefox.command b/Installers/Extras/Browsers/Firefox.command new file mode 100644 index 00000000..652ec106 --- /dev/null +++ b/Installers/Extras/Browsers/Firefox.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Browsers/Opera.command b/Installers/Extras/Browsers/Opera.command new file mode 100644 index 00000000..3b03d843 --- /dev/null +++ b/Installers/Extras/Browsers/Opera.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Opera" "Opera.app" "http://get.geo.opera.com/pub/opera/desktop/38.0.2220.41/mac/Opera_38.0.2220.41_Setup.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Caffeine.command b/Installers/Extras/Caffeine.command new file mode 100644 index 00000000..177ccffc --- /dev/null +++ b/Installers/Extras/Caffeine.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "zip" "Caffeine" "caffeine.app" "http://download.lightheadsw.com/download.php?software=caffeine" "" "" "build" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Calibre.command b/Installers/Extras/Calibre.command new file mode 100644 index 00000000..e08ccf8f --- /dev/null +++ b/Installers/Extras/Calibre.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Calibre" "calibre.app" "http://status.calibre-ebook.com/dist/osx32" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/Dropbox.command b/Installers/Extras/Cloud/Dropbox.command new file mode 100644 index 00000000..61cd3454 --- /dev/null +++ b/Installers/Extras/Cloud/Dropbox.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Dropbox" "Dropbox.app" "https://www.dropbox.com/download?plat=mac" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/Evernote.command b/Installers/Extras/Cloud/Evernote.command new file mode 100644 index 00000000..235449e3 --- /dev/null +++ b/Installers/Extras/Cloud/Evernote.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Evernote" "Evernote.app" "http://evernote.com/download/get.php?file=EvernoteMac" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/Google Drive.command b/Installers/Extras/Cloud/Google Drive.command new file mode 100644 index 00000000..419f415c --- /dev/null +++ b/Installers/Extras/Cloud/Google Drive.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Drive" "Google Drive.app" "https://dl-ssl.google.com/drive/installgoogledrive.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/KeePassX.command b/Installers/Extras/Cloud/KeePassX.command new file mode 100644 index 00000000..de8fb9cc --- /dev/null +++ b/Installers/Extras/Cloud/KeePassX.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "KeePassX" "KeePassX.app" "http://www.keepassx.org/releases/2.0.2/KeePassX-2.0.2.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/OmniFocus.command b/Installers/Extras/Cloud/OmniFocus.command new file mode 100644 index 00000000..50ad2d36 --- /dev/null +++ b/Installers/Extras/Cloud/OmniFocus.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "OpenOffice" "OpenOffice.app" "http://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_MacOS_x86-64_install_en-US.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Cloud/Tunnelblick.command b/Installers/Extras/Cloud/Tunnelblick.command new file mode 100644 index 00000000..75283d6a --- /dev/null +++ b/Installers/Extras/Cloud/Tunnelblick.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Tunnelblick" "Tunnelblick.app" "https://tunnelblick.net/release/Tunnelblick_3.6.2beta02_build_4551.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Communication/Adium.command b/Installers/Extras/Communication/Adium.command new file mode 100644 index 00000000..8c280125 --- /dev/null +++ b/Installers/Extras/Communication/Adium.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Adium" "Adium.app" "https://adiumx.cachefly.net/Adium_1.5.10.2.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Communication/Skype.command b/Installers/Extras/Communication/Skype.command new file mode 100644 index 00000000..c17cc913 --- /dev/null +++ b/Installers/Extras/Communication/Skype.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Skype" "Skype.app" "http://www.skype.com/go/getskype-macosx.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Communication/Slack.command b/Installers/Extras/Communication/Slack.command new file mode 100644 index 00000000..a58adaff --- /dev/null +++ b/Installers/Extras/Communication/Slack.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "zip" "Slack" "Slack.app" "https://slack.com/ssb/download-osx" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Compression/Keka.command b/Installers/Extras/Compression/Keka.command new file mode 100644 index 00000000..a21736c6 --- /dev/null +++ b/Installers/Extras/Compression/Keka.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.0.6/mac/x86_64/LibreOffice_5.0.6_MacOS_x86-64.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Compression/The Unarchiver.command b/Installers/Extras/Compression/The Unarchiver.command new file mode 100644 index 00000000..3184f574 --- /dev/null +++ b/Installers/Extras/Compression/The Unarchiver.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/DiskMaker X.command b/Installers/Extras/DiskMaker X.command new file mode 100644 index 00000000..49b21ff9 --- /dev/null +++ b/Installers/Extras/DiskMaker X.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "DiskMaker X 5" "undefined" "http://diskmakerx.com/downloads/DiskMaker_X_503.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/FileZilla.command b/Installers/Extras/FileZilla.command new file mode 100644 index 00000000..8bfeb389 --- /dev/null +++ b/Installers/Extras/FileZilla.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "tar" "FileZilla" "FileZilla.app" "http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.19.0/FileZilla_3.19.0_macosx-x86.app.tar.bz2" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Google Earth.command b/Installers/Extras/Google Earth.command new file mode 100644 index 00000000..d44a8c76 --- /dev/null +++ b/Installers/Extras/Google Earth.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Earth" "Google Earth.app" "https://dl.google.com/earth/client/advanced/current/GoogleEarthMac-Intel.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Image-Photo/Flux.command b/Installers/Extras/Image-Photo/Flux.command new file mode 100644 index 00000000..c11c8bf6 --- /dev/null +++ b/Installers/Extras/Image-Photo/Flux.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "zip" "Flux" "Flux.app" "https://justgetflux.com/mac/Flux.zip" "" "" "build" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Image-Photo/GIMP.command b/Installers/Extras/Image-Photo/GIMP.command new file mode 100644 index 00000000..b343b203 --- /dev/null +++ b/Installers/Extras/Image-Photo/GIMP.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "GIMP" "GIMP.app" "http://download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-2.8.16-x86_64-1.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Image-Photo/Inkscape.command b/Installers/Extras/Image-Photo/Inkscape.command new file mode 100644 index 00000000..bccfef6c --- /dev/null +++ b/Installers/Extras/Image-Photo/Inkscape.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Inkscape" "Inkscape.app" "https://inkscape.org/en/gallery/item/3896/Inkscape-0.91-1-x11-10.7-x86_64.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Office/LibreOffice.command b/Installers/Extras/Office/LibreOffice.command new file mode 100644 index 00000000..a21736c6 --- /dev/null +++ b/Installers/Extras/Office/LibreOffice.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.0.6/mac/x86_64/LibreOffice_5.0.6_MacOS_x86-64.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Office/OpenOffice.command b/Installers/Extras/Office/OpenOffice.command new file mode 100644 index 00000000..50ad2d36 --- /dev/null +++ b/Installers/Extras/Office/OpenOffice.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "OpenOffice" "OpenOffice.app" "http://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_MacOS_x86-64_install_en-US.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Office/Thunderbird.command b/Installers/Extras/Office/Thunderbird.command new file mode 100644 index 00000000..e25ad183 --- /dev/null +++ b/Installers/Extras/Office/Thunderbird.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Thunderbird" "Thunderbird.app" "http://download.mozilla.org/?product=thunderbird-latest&os=osx&lang=en-US" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Security/BitDefender ART.command b/Installers/Extras/Security/BitDefender ART.command new file mode 100644 index 00000000..9634beb8 --- /dev/null +++ b/Installers/Extras/Security/BitDefender ART.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "zip" "BitDefender ART" "Adware Removal Tool.app" "http://download.bitdefender.com/mac/tools/Adware%20Removal%20Tool.zip" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Security/Malwarebytes.command b/Installers/Extras/Security/Malwarebytes.command new file mode 100644 index 00000000..e0225730 --- /dev/null +++ b/Installers/Extras/Security/Malwarebytes.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/Steam.command b/Installers/Extras/Steam.command new file mode 100644 index 00000000..82c7b2e5 --- /dev/null +++ b/Installers/Extras/Steam.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Steam" "Steam.app" "http://media.steampowered.com/client/installer/steam.dmg" "" "" "build" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/TeamViewerQS.command b/Installers/Extras/TeamViewerQS.command new file mode 100644 index 00000000..0bb04c91 --- /dev/null +++ b/Installers/Extras/TeamViewerQS.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "TeamViewerQS" "TeamViewerQS.app" "http://download.teamviewer.com/download/TeamViewerQS.dmg" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/Extras/iTerm2.command b/Installers/Extras/iTerm2.command new file mode 100644 index 00000000..9c83bb0f --- /dev/null +++ b/Installers/Extras/iTerm2.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_4.zip" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/Installers/OS X.command b/Installers/OS X.command new file mode 100644 index 00000000..8ba1beff --- /dev/null +++ b/Installers/OS X.command @@ -0,0 +1,87 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" "" +installApp "dmg" "Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" "" +installApp "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_4.zip" "" "" "" +installApp "dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" "" +installApp "dmg" "Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" "" +installApp "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" "" +installApp "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" "" +installApp "tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/OSR & VR/Malwarebytes.command b/OSR & VR/Malwarebytes.command new file mode 100644 index 00000000..e0225730 --- /dev/null +++ b/OSR & VR/Malwarebytes.command @@ -0,0 +1,80 @@ +#/bin/bash +clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps + +############################### +# Print script header # +############################### +echo $" + + ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ + ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ + ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ + ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ + ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ + ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" + + +############################### +# Define worker functions # +############################### +versionChecker() { + local v1=$1; local v2=$2; + while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done + while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do + char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done + v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`; + checkVersion "$v1" "$v2" +} + +checkVersion() { + [ "$1" == "$2" ] && return 1 + v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`; + if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0; + [[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $? + else [ "$1" -gt "$2" ] && return 1 || return 0; fi +} + +appStatus() { + if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else + if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi + INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"` + if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`; + elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi + checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?; + if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi +} +installApp() { + echo $'\360\237\214\200 - ['$2'] Downloading app...' + if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null; + if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg" + elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip"; + if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi; + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null; + if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'; + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n' + elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi + rm -rf "$2.tar.bz2" && rm -rf "$3"; fi +} + +############################### +# Install selected apps # +############################### +installApp "dmg" "Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" "" + +############################### +# Print script footer # +############################### +echo $'------------------------------------------------------------------------------' +echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!' +echo $'------------------------------------------------------------------------------\n' +rm -rf ~/.macapps \ No newline at end of file diff --git a/SW Diagnostics.command b/SW Diagnostics.command index 0634101c..12293318 100644 --- a/SW Diagnostics.command +++ b/SW Diagnostics.command @@ -1,5 +1,5 @@ #!/bin/bash -# Wizard Kit: Start SW Diagnostics +## Wizard Kit: Start SW Diagnostics # Init ## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227)