From 2ae7bb017f9e9b76f152374b18be3f5263de842e Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Mon, 4 Dec 2017 16:35:38 -0800 Subject: [PATCH 1/4] 2016-08: Retroactive initial commit --- .bin/Scripts/diagnostics | 118 +++++++++++++++++++++++++++ Diagnostics/Disk Inventory X.command | 13 +++ Enable TRIM.command | 6 ++ LICENSE.txt | 7 ++ SW Diagnostics.command | 13 +++ 5 files changed, 157 insertions(+) create mode 100644 .bin/Scripts/diagnostics create mode 100644 Diagnostics/Disk Inventory X.command create mode 100644 Enable TRIM.command create mode 100644 LICENSE.txt create mode 100644 SW Diagnostics.command diff --git a/.bin/Scripts/diagnostics b/.bin/Scripts/diagnostics new file mode 100644 index 00000000..1322d587 --- /dev/null +++ b/.bin/Scripts/diagnostics @@ -0,0 +1,118 @@ +#!/bin/bash +# Wizard Kit: SW Diagnostics + +# Init +## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) +pushd . > /dev/null +cd "$(dirname "$0")/.." +BIN="$(pwd)" +popd > /dev/null +DATE="$(date "+%F")" +LOG_DIR="/WK/Info" +LOG_FILE="${LOG_DIR}/${DATE}/Diagnostics.log" +mkdir -p "${LOG_DIR}" 2>/dev/null +# . "$BIN/os_check" + +# Setup color and message printing +export CLICOLOR=1 +CLEAR="\033[0m" +RED="\033[31m" +GREEN="\033[32m" +YELLOW="\033[33m" +BLUE="\033[34m" +function print_error() { + echo -e "${RED}${1}${CLEAR}" + echo "${1}" >> "${LOG_FILE}" +} +function print_info() { + echo -e "${BLUE}${1}${CLEAR}" + echo "${1}" >> "${LOG_FILE}" +} +function print_success() { + echo -e "${GREEN}${1}${CLEAR}" + echo "${1}" >> "${LOG_FILE}" +} +function print_warning() { + echo -e "${YELLOW}${1}${CLEAR}" + echo "${1}" >> "${LOG_FILE}" +} +function print_general() { + echo "${1}" + echo "${1}" >> "${LOG_FILE}" +} + +# Get Ticket # +ticket="" +while [[ "${ticket}" == "" ]]; do + echo -n "Enter the ticket number: " + read _tmp + if echo "${_tmp}" | grep -Eq '^([0-9]+[-_0-9A-Za-z]*)$'; then + ticket="${_tmp}" + fi +done + +# Start +print_general "Starting SW Diagnostics" +print_general " For ticket #${ticket}" + +# Sanitize Environment + +# Network +print_general "Testing network connection..." +while ! ping -c 2 "google.com" >/dev/null 2>&1; do + print_warning "System appears offline. Please connect to the internet." + echo -n "Press Enter to try again... " + read _tmp +done + +# Infection Scan + +# OS Health +print_general "Checking disk permissions..." +/usr/libexec/repair_packages --verify --standard-pkgs >> "${LOG_DIR}/permissions.log" +if [[ "$(wc -l "${LOG_DIR}/permissions.log")" -ge "10" ]]; then + head -9 "${LOG_DIR}/permissions.log" | sed 's/^/ /' | tee -a "${LOG_FILE}" + print_general " ... $(echo "$(wc -l "${LOG_DIR}/permissions.log") - 9" | bc) lines omitted" +else + sed 's/^/ /' "${LOG_DIR}/permissions.log" | tee -a "${LOG_FILE}" +fi + +# Browser Backup + +# Temp file size +print_general "Checking temp file size..." +du -sch ~/.Trash | sed 's/^/ /' | tee -a "${LOG_FILE}" + +# Save System Info +print_general "System Information:" +# system_profiler +## HW +## Keys? +## OS +sw_vers | sed 's/^/ /' | tee -a "${LOG_FILE}" + +## SW + +# OS/SW Updates +softwareupdate -l | tee -a "${LOG_FILE}" + + +# Battery +#ioreg + +# User data size +print_general "User data:" +pushd /Users >/dev/null +for user in $(dscl . -list /Users | grep -Ev '^(_|(daemon|nobody|root)$)'); do + print_general " $(id -F "$user") ($user)" + du -sch "$user/"* | sed 's/^/ /' | tee -a "${LOG_FILE}" +done +popd >/dev/null + +# Upload results +#rsync + +# Open results + +# Done +exit 0 diff --git a/Diagnostics/Disk Inventory X.command b/Diagnostics/Disk Inventory X.command new file mode 100644 index 00000000..508736a7 --- /dev/null +++ b/Diagnostics/Disk Inventory X.command @@ -0,0 +1,13 @@ +#!/bin/bash +# Wizard Kit: Generic app launcher + +# Init +## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) +pushd . > /dev/null +cd "$(dirname "$0")/../.bin" +BIN="$(pwd)" +popd > /dev/null + +# Run +"$BIN/Disk Inventory X.app/Contents/MacOS/Disk Inventory X" & +exit 0 diff --git a/Enable TRIM.command b/Enable TRIM.command new file mode 100644 index 00000000..6ca34bc7 --- /dev/null +++ b/Enable TRIM.command @@ -0,0 +1,6 @@ +#!/bin/bash +# Wizard Kit: Enable TRIM + +# Run trimforce +sudo trimforce enable +exit 0 diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..7734ae70 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright (c) 2016 Alan Mason + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/SW Diagnostics.command b/SW Diagnostics.command new file mode 100644 index 00000000..0634101c --- /dev/null +++ b/SW Diagnostics.command @@ -0,0 +1,13 @@ +#!/bin/bash +# Wizard Kit: Start SW Diagnostics + +# Init +## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) +pushd . > /dev/null +cd "$(dirname "$0")/.bin" +BIN="$(pwd)" +popd > /dev/null + +# Run +sudo "$BIN/Scripts/diagnostics" +exit 0 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 2/4] 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) From cf4635be1712c431486c6c2d11da996c6d3849d1 Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Mon, 4 Dec 2017 16:48:40 -0800 Subject: [PATCH 3/4] 2016-09: Retroactive Updates * App install code not called from .bin/Scripts/install_app * This ensures all installs are treated the same * install code now supports apps not listed on macapps.link * Launcher scripts now search the current path for .bin * SW Diagnostics fleshed-out * Added more info sections * More consistant logging * Probably more.. --- .bin/Scripts/diagnostics | 101 ++++++++++--- .bin/Scripts/install_app | 140 ++++++++++++++++++ .bin/_templates/create_installers | 101 +++++++++++++ .bin/_templates/install.command | 27 ++++ .gitignore | 1 + SW Diagnostics.command => Diagnostics.command | 0 .../Extras/Audio-Video/HandBrake.command | 99 +++---------- Installers/Extras/Audio-Video/Kodi.command | 27 ++++ Installers/Extras/Audio-Video/Plex.command | 27 ++++ Installers/Extras/Audio-Video/Spotify.command | 99 +++---------- Installers/Extras/Audio-Video/VLC.command | 99 +++---------- Installers/Extras/Audio-Video/mpv.command | 99 +++---------- .../Extras/Browsers/Chrome & Firefox.command | 81 ---------- Installers/Extras/Browsers/Chrome.command | 80 ---------- Installers/Extras/Browsers/Firefox.command | 99 +++---------- .../Extras/Browsers/Google Chrome.command | 27 ++++ Installers/Extras/Browsers/Opera.command | 99 +++---------- Installers/Extras/Caffeine.command | 99 +++---------- Installers/Extras/Calibre.command | 99 +++---------- Installers/Extras/Cloud/Dropbox.command | 99 +++---------- Installers/Extras/Cloud/Evernote.command | 99 +++---------- Installers/Extras/Cloud/FileZilla.command | 27 ++++ Installers/Extras/Cloud/Google Drive.command | 99 +++---------- Installers/Extras/Cloud/KeePassX.command | 99 +++---------- Installers/Extras/Cloud/OmniFocus.command | 99 +++---------- Installers/Extras/Cloud/Tunnelblick.command | 99 +++---------- Installers/Extras/Communication/Adium.command | 99 +++---------- Installers/Extras/Communication/Skype.command | 99 +++---------- Installers/Extras/Communication/Slack.command | 99 +++---------- Installers/Extras/Compression/Keka.command | 99 +++---------- .../Extras/Compression/The Unarchiver.command | 99 +++---------- Installers/Extras/Compression/UnRarX.command | 27 ++++ Installers/Extras/DiskMaker X.command | 80 ---------- Installers/Extras/FileZilla.command | 80 ---------- Installers/Extras/Google Earth.command | 80 ---------- Installers/Extras/GoogleEarth.command | 27 ++++ Installers/Extras/Image-Photo/Flux.command | 99 +++---------- Installers/Extras/Image-Photo/GIMP.command | 99 +++---------- .../Extras/Image-Photo/Inkscape.command | 99 +++---------- Installers/Extras/Macs Fan Control.command | 27 ++++ Installers/Extras/Office/LibreOffice.command | 99 +++---------- Installers/Extras/Office/OpenOffice.command | 99 +++---------- Installers/Extras/Office/Thunderbird.command | 99 +++---------- .../Extras/Security/BitDefender ART.command | 99 +++---------- Installers/Extras/Security/ClamXav.command | 27 ++++ .../Malwarebytes Anti-Malware.command | 27 ++++ .../Extras/Security/Malwarebytes.command | 80 ---------- Installers/Extras/Steam.command | 99 +++---------- Installers/Extras/TeamViewerQS.command | 99 +++---------- Installers/Extras/gfxCardStatus.command | 27 ++++ Installers/Extras/iTerm2.command | 99 +++---------- Installers/OS X.command | 113 ++++---------- 52 files changed, 1317 insertions(+), 2788 deletions(-) create mode 100644 .bin/Scripts/install_app create mode 100644 .bin/_templates/create_installers create mode 100644 .bin/_templates/install.command rename SW Diagnostics.command => Diagnostics.command (100%) create mode 100644 Installers/Extras/Audio-Video/Kodi.command create mode 100644 Installers/Extras/Audio-Video/Plex.command delete mode 100644 Installers/Extras/Browsers/Chrome & Firefox.command delete mode 100644 Installers/Extras/Browsers/Chrome.command create mode 100644 Installers/Extras/Browsers/Google Chrome.command create mode 100644 Installers/Extras/Cloud/FileZilla.command create mode 100644 Installers/Extras/Compression/UnRarX.command delete mode 100644 Installers/Extras/DiskMaker X.command delete mode 100644 Installers/Extras/FileZilla.command delete mode 100644 Installers/Extras/Google Earth.command create mode 100644 Installers/Extras/GoogleEarth.command create mode 100644 Installers/Extras/Macs Fan Control.command create mode 100644 Installers/Extras/Security/ClamXav.command create mode 100644 Installers/Extras/Security/Malwarebytes Anti-Malware.command delete mode 100644 Installers/Extras/Security/Malwarebytes.command create mode 100644 Installers/Extras/gfxCardStatus.command diff --git a/.bin/Scripts/diagnostics b/.bin/Scripts/diagnostics index 00fb77b1..107d29bf 100644 --- a/.bin/Scripts/diagnostics +++ b/.bin/Scripts/diagnostics @@ -2,15 +2,30 @@ ## Wizard Kit: SW Diagnostics # Init -## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227) +clear +BIN="" + +# Find BIN path pushd . > /dev/null -cd "$(dirname "$0")/.." -BIN="$(pwd)" +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Prep /WK/Info DATE="$(date "+%F")" -LOG_DIR="/WK/Info" -LOG_FILE="${LOG_DIR}/${DATE}/Diagnostics.log" -mkdir -p "$(dirname "${LOG_FILE}")" 2>/dev/null +LOG_DIR="/WK/Info/${DATE}" +LOG_FILE="${LOG_DIR}/Diagnostics.log" +mkdir -p "${LOG_DIR}" 2>/dev/null # . "$BIN/os_check" # Setup color and message printing @@ -52,55 +67,89 @@ while [[ "${ticket}" == "" ]]; do done # Start +clear print_general "Starting SW Diagnostics" print_general " For ticket #${ticket}" # Sanitize Environment +#TODO # Network +print_general "" print_general "Testing network connection..." while ! ping -c 2 "google.com" >/dev/null 2>&1; do print_warning "System appears offline. Please connect to the internet." echo -n "Press Enter to try again... " read _tmp done +print_general " Connected." # Infection Scan +#TODO # OS Health +print_general "" print_general "Checking disk permissions..." -/usr/libexec/repair_packages --verify --standard-pkgs >> "${LOG_DIR}/permissions.log" -if [[ "$(wc -l "${LOG_DIR}/permissions.log")" -ge "10" ]]; then - head -9 "${LOG_DIR}/permissions.log" | sed 's/^/ /' | tee -a "${LOG_FILE}" - print_general " ... $(echo "$(wc -l "${LOG_DIR}/permissions.log") - 9" | bc) lines omitted" -else +/usr/libexec/repair_packages --verify --standard-pkgs >> "${LOG_DIR}/permissions.log" 2>/dev/null +_log_length="$(cat "${LOG_DIR}/permissions.log" | wc -l | sed 's/ //g')" +if [[ "$_log_length" -eq "0" ]]; then + print_general " No issues found." +elif [[ "$_log_length" -lt "10" ]]; then sed 's/^/ /' "${LOG_DIR}/permissions.log" | tee -a "${LOG_FILE}" +else + head -9 "${LOG_DIR}/permissions.log" | sed 's/^/ /' | tee -a "${LOG_FILE}" + print_general " ...$(echo "$_log_length - 9" | bc) lines omitted" fi +# Check OS/SW Updates +print_general "" +print_general "Checking for available software updates..." +softwareupdate -l | grep '*' | tee -a "${LOG_FILE}" # Browser Backup +#TODO # Temp file size +print_general "" print_general "Checking temp file size..." du -sch ~/.Trash | sed 's/^/ /' | tee -a "${LOG_FILE}" # Save System Info -print_general "System Information:" -# system_profiler -## HW -## Keys? +print_general "" +print_general "Saving system information..." +system_profiler -detailLevel full >> "${LOG_DIR}/system_profiler.txt" +## Installed App list +system_profiler -detailLevel full SPApplicationsDataType >> "${LOG_DIR}/installed-applications.txt" +print_general " Done." + +## Save product keys +#TODO? + ## OS +print_general "" +print_general "Operating System:" sw_vers | sed 's/^/ /' | tee -a "${LOG_FILE}" -## SW +## Free Space +print_general "" +print_general "Drive details:" +system_profiler -detailLevel mini SPStorageDataType | egrep '^\s+\w+:$|Available|Capacity' | tee -a "${LOG_FILE}" -# OS/SW Updates -softwareupdate -l | tee -a "${LOG_FILE}" +## Installed RAM +print_general "" +print_general "Installed memory:" +system_profiler -detailLevel mini SPMemoryDataType | egrep 'DIMM|Size' | sed 's/ //' | tee -a "${LOG_FILE}" +echo " Total: $(($(sysctl -a hw.memsize | sed 's/.*: //')/1024/1024/1024)) Gb" | tee -a "${LOG_FILE}" +# List installed Office Apps +print_general "" +print_general "Installed office applications:" +egrep "Microsoft Word|Microsoft Excel|Microsoft Outlook|Office|office" "${LOG_DIR}/installed-applications.txt" | egrep ':$' | sed 's/://' | tee -a "${LOG_FILE}" # Battery -#ioreg +#TODO - ioreg? # User data size +print_general "" print_general "User data:" pushd /Users >/dev/null for user in $(dscl . -list /Users | grep -Ev '^(_|(daemon|nobody|root)$)'); do @@ -112,7 +161,19 @@ popd >/dev/null # Upload results #rsync -# Open results +# Fix /WK/Info permissions +chmod -R 644 "${LOG_DIR}" +chmod 755 "${LOG_DIR}" # Done +print_general "" +print_general "Done." +echo "" +echo -n "Press Enter to exit..." +read _tmp >/dev/null 2>&1 + +# Open results +/Applications/TextEdit.app/Contents/MacOS/TextEdit "${LOG_FILE}" & + +# Exit exit 0 diff --git a/.bin/Scripts/install_app b/.bin/Scripts/install_app new file mode 100644 index 00000000..0d111cb5 --- /dev/null +++ b/.bin/Scripts/install_app @@ -0,0 +1,140 @@ +#!/bin/bash + +# Init +pushd . > /dev/null +cd "$(dirname "$0")/.." +mkdir install_cache >/dev/null 2>&1 +cd install_cache || exit 1 +TMP_DIR="$(mktemp -d 2>/dev/null || mktemp -d -t 'wktmp')" + +# Functions +## code heavily borrowed from macapps.link +getApp() { + if [ -f "$1" ]; then + echo $'\360\237\214\200 - ['$2'] Copying app...' + cp -n "$1" "$2" + else + echo $'\360\237\214\200 - ['$2'] Downloading app...' + curl "$1" -L -R -f -s -o "$2" -z "$2" + fi +} + +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() { + getApp "$4" "$2.$1" + cp "$2.$1" "$TMP_DIR/" + pushd "$TMP_DIR" >/dev/null + if [ $1 == "dmg" ]; then + yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null + install_status="$(appStatus "$3" "$2" "" "dmg" "$7")" + if [[ "$install_status" == "updated" ]]; then + echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!' + elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then + ditto "/Volumes/$2/$3" "/Applications/$3" + echo $'\360\237\214\216 - ['$2'] Successfully updated!' + elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then + echo $'\342\235\214 - ['$2'] This app cant be updated!' + elif [[ "$install_status" == "uninstalled" ]]; then + cp -R "/Volumes/$2/$3" /Applications + echo $'\360\237\221\215 - ['$2'] Succesfully installed!' + fi + hdiutil unmount "/Volumes/$2" > /dev/null + elif [ $1 == "zip" ]; then + unzip -qq "$2.zip" + install_status="$(appStatus "$3" "" "$5" "zip" "$7")" + if [[ "$install_status" == "updated" ]]; then + echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!' + elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then + ditto "$5$3" "/Applications/$3" + echo $'\360\237\214\216 - ['$2'] Successfully updated!' + elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then + echo $'\342\235\214 - ['$2'] This app cant be updated!' + elif [[ "$install_status" == "uninstalled" ]]; then + mv "$5$3" /Applications + echo $'\360\237\221\215 - ['$2'] Succesfully installed!' + fi + rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3" + elif [[ $1 == "tar" || $1 == "tbz" || $1 == "tgz" || $1 == "txz" ]]; then + tar -zxf "$2.$1" > /dev/null; + install_status="$(appStatus "$3" "" "$5" "tar" "$7")" + if [[ "$install_status" == "updated" ]]; then + echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!' + elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then + ditto "$3" "/Applications/$3" + echo $'\360\237\214\216 - ['$2'] Successfully updated!' + elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then + echo $'\342\235\214 - ['$2'] This app cant be updated!' + elif [[ "$install_status" == "uninstalled" ]]; then + mv "$5$3" /Applications + echo $'\360\237\221\215 - ['$2'] Succesfully installed!' + fi + rm -rf "$2.$1" && rm -rf "$3" + fi + popd > /dev/null +} + +# Install App +installApp "$@" + +# Done +rm -R "$TMP_DIR" diff --git a/.bin/_templates/create_installers b/.bin/_templates/create_installers new file mode 100644 index 00000000..3d08e7e3 --- /dev/null +++ b/.bin/_templates/create_installers @@ -0,0 +1,101 @@ +#!/bin/bash + +# Generate installer commands +cd "$HOME/wk-macos/Installers" + +# Audio-Video +sed 's#___#"dmg" "HandBrake" "HandBrake.app" "http://downloads.sourceforge.net/project/handbrake/0.10.5/HandBrake-0.10.5-MacOSX.6_GUI_x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/HandBrake.command" +chmod +x "Extras/Audio-Video/HandBrake.command" +sed 's#___#"dmg" "Kodi" "Kodi.app" "http://mirrors.kodi.tv/releases/osx/x86_64/kodi-16.1-Jarvis-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/Kodi.command" +chmod +x "Extras/Audio-Video/Kodi.command" +sed 's#___#"tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" ""#' "install.command" >> "Extras/Audio-Video/mpv.command" +chmod +x "Extras/Audio-Video/mpv.command" +sed 's#___#"zip" "Plex" "Plex Media Server.app" "https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/PlexMediaServer-0.9.16.6.1993-5089475-OSX.zip" "" "" ""#' "install.command" >> "Extras/Audio-Video/Plex.command" +chmod +x "Extras/Audio-Video/Plex.command" +sed 's#___#"dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/Spotify.command" +chmod +x "Extras/Audio-Video/Spotify.command" +sed 's#___#"dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/VLC.command" +chmod +x "Extras/Audio-Video/VLC.command" + +# Browsers +sed 's#___#"dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" ""#' "install.command" >> "Extras/Browsers/Firefox.command" +chmod +x "Extras/Browsers/Firefox.command" +sed 's#___#"dmg" "Google Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" ""#' "install.command" >> "Extras/Browsers/Google Chrome.command" +chmod +x "Extras/Browsers/Google Chrome.command" +sed 's#___#"dmg" "Opera" "Opera.app" "http://get.geo.opera.com/pub/opera/desktop/39.0.2256.71/mac/Opera_39.0.2256.71_Setup.dmg" "" "" ""#' "install.command" >> "Extras/Browsers/Opera.command" +chmod +x "Extras/Browsers/Opera.command" + +# Cloud +sed 's#___#"dmg" "Google Drive" "Google Drive.app" "https://dl-ssl.google.com/drive/installgoogledrive.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/Google Drive.command" +chmod +x "Extras/Cloud/Google Drive.command" +sed 's#___#"dmg" "Dropbox" "Dropbox.app" "https://www.dropbox.com/download?plat=mac" "" "" ""#' "install.command" >> "Extras/Cloud/Dropbox.command" +chmod +x "Extras/Cloud/Dropbox.command" +sed 's#___#"dmg" "Evernote" "Evernote.app" "http://evernote.com/download/get.php?file=EvernoteMac" "" "" ""#' "install.command" >> "Extras/Cloud/Evernote.command" +chmod +x "Extras/Cloud/Evernote.command" +sed 's#___#"tar" "FileZilla" "FileZilla.app" "http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.21.0/FileZilla_3.21.0_macosx-x86.app.tar.bz2" "" "" ""#' "install.command" >> "Extras/Cloud/FileZilla.command" +chmod +x "Extras/Cloud/FileZilla.command" +sed 's#___#"dmg" "KeePassX" "KeePassX.app" "http://www.keepassx.org/releases/2.0.2/KeePassX-2.0.2.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/KeePassX.command" +chmod +x "Extras/Cloud/KeePassX.command" +sed 's#___#"dmg" "OmniFocus" "OmniFocus.app" "http://www.omnigroup.com/download/latest/omnifocus" "" "" ""#' "install.command" >> "Extras/Cloud/OmniFocus.command" +chmod +x "Extras/Cloud/OmniFocus.command" +sed 's#___#"dmg" "Tunnelblick" "Tunnelblick.app" "https://tunnelblick.net/release/Tunnelblick_3.6.7beta04_build_4601.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/Tunnelblick.command" +chmod +x "Extras/Cloud/Tunnelblick.command" + +# Communication +sed 's#___#"dmg" "Adium" "Adium.app" "https://adiumx.cachefly.net/Adium_1.5.10.2.dmg" "" "" ""#' "install.command" >> "Extras/Communication/Adium.command" +chmod +x "Extras/Communication/Adium.command" +sed 's#___#"dmg" "Skype" "Skype.app" "http://www.skype.com/go/getskype-macosx.dmg" "" "" ""#' "install.command" >> "Extras/Communication/Skype.command" +chmod +x "Extras/Communication/Skype.command" +sed 's#___#"zip" "Slack" "Slack.app" "https://slack.com/ssb/download-osx" "" "" ""#' "install.command" >> "Extras/Communication/Slack.command" +chmod +x "Extras/Communication/Slack.command" + +# Compression +sed 's#___#"dmg" "Keka" "Keka.app" "http://download.kekaosx.com/" "" "" ""#' "install.command" >> "Extras/Compression/Keka.command" +chmod +x "Extras/Compression/Keka.command" +sed 's#___#"dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" ""#' "install.command" >> "Extras/Compression/The Unarchiver.command" +chmod +x "Extras/Compression/The Unarchiver.command" +sed 's#___#"zip" "UnRarX" "UnRarX.app" "http://www.unrarx.com/files/UnRarX_2.2.zip" "" "" ""#' "install.command" >> "Extras/Compression/UnRarX.command" +chmod +x "Extras/Compression/UnRarX.command" + +# Image-Photo +sed 's#___#"zip" "Flux" "Flux.app" "https://justgetflux.com/mac/Flux.zip" "" "" "build"#' "install.command" >> "Extras/Image-Photo/Flux.command" +chmod +x "Extras/Image-Photo/Flux.command" +sed 's#___#"dmg" "Inkscape" "Inkscape.app" "https://inkscape.org/en/gallery/item/3896/Inkscape-0.91-1-x11-10.7-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Image-Photo/Inkscape.command" +chmod +x "Extras/Image-Photo/Inkscape.command" +sed 's#___#"dmg" "GIMP" "GIMP.app" "http://download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-2.8.18-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Image-Photo/GIMP.command" +chmod +x "Extras/Image-Photo/GIMP.command" + +# Office +sed 's#___#"dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.1.5/mac/x86_64/LibreOffice_5.1.5_MacOS_x86-64.dmg" "" "" ""#' "install.command" >> "Extras/Office/LibreOffice.command" +chmod +x "Extras/Office/LibreOffice.command" +sed 's#___#"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" "" "" ""#' "install.command" >> "Extras/Office/OpenOffice.command" +chmod +x "Extras/Office/OpenOffice.command" +sed 's#___#"dmg" "Thunderbird" "Thunderbird.app" "http://download.mozilla.org/?product=thunderbird-latest&os=osx&lang=en-US" "" "" ""#' "install.command" >> "Extras/Office/Thunderbird.command" +chmod +x "Extras/Office/Thunderbird.command" + +# Security +sed 's#___#"zip" "BitDefender ART" "Adware Removal Tool.app" "http://download.bitdefender.com/mac/tools/Adware%20Removal%20Tool.zip" "" "" ""#' "install.command" >> "Extras/Security/BitDefender ART.command" +chmod +x "Extras/Security/BitDefender ART.command" +sed 's#___#"dmg" "ClamXav" "ClamXav.app" "http://www.clamxav.com/downloads/ClamXav_2.9.2_2478.zip" "" "" ""#' "install.command" >> "Extras/Security/ClamXav.command" +chmod +x "Extras/Security/ClamXav.command" +sed 's#___#"dmg" "Malwarebytes Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" ""#' "install.command" >> "Extras/Security/Malwarebytes Anti-Malware.command" +chmod +x "Extras/Security/Malwarebytes Anti-Malware.command" + +# Misc +sed 's#___#"zip" "Caffeine" "caffeine.app" "http://download.lightheadsw.com/download.php?software=caffeine" "" "" "build"#' "install.command" >> "Extras/Caffeine.command" +chmod +x "Extras/Caffeine.command" +sed 's#___#"dmg" "Calibre" "calibre.app" "http://status.calibre-ebook.com/dist/osx32" "" "" ""#' "install.command" >> "Extras/Calibre.command" +chmod +x "Extras/Calibre.command" +sed 's#___#"zip" "gfxCardStatus" "gfxCardStatus.app" "http://gfx.io/downloads/gfxCardStatus-2.3.zip" "" "" ""#' "install.command" >> "Extras/gfxCardStatus.command" +chmod +x "Extras/gfxCardStatus.command" +sed 's#___#"dmg" "GoogleEarth" "Google Earth.app" "https://dl.google.com/earth/client/advanced/current/GoogleEarthMac-Intel.dmg" "" "" ""#' "install.command" >> "Extras/GoogleEarth.command" +chmod +x "Extras/GoogleEarth.command" +sed 's#___#"zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" ""#' "install.command" >> "Extras/iTerm2.command" +chmod +x "Extras/iTerm2.command" +sed 's#___#"zip" "Macs Fan Control" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" ""#' "install.command" >> "Extras/Macs Fan Control.command" +chmod +x "Extras/Macs Fan Control.command" +sed 's#___#"dmg" "Steam" "Steam.app" "http://media.steampowered.com/client/installer/steam.dmg" "" "" "build"#' "install.command" >> "Extras/Steam.command" +chmod +x "Extras/Steam.command" +sed 's#___#"dmg" "TeamViewerQS" "TeamViewerQS.app" "http://download.teamviewer.com/download/TeamViewerQS.dmg" "" "" ""#' "install.command" >> "Extras/TeamViewerQS.command" +chmod +x "Extras/TeamViewerQS.command" + diff --git a/.bin/_templates/install.command b/.bin/_templates/install.command new file mode 100644 index 00000000..21bdbf95 --- /dev/null +++ b/.bin/_templates/install.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" ___ + +# Done +echo "" diff --git a/.gitignore b/.gitignore index e43b0f98..fcc15219 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +.bin/install_cache diff --git a/SW Diagnostics.command b/Diagnostics.command similarity index 100% rename from SW Diagnostics.command rename to Diagnostics.command diff --git a/Installers/Extras/Audio-Video/HandBrake.command b/Installers/Extras/Audio-Video/HandBrake.command index d2e66524..58fe3b66 100644 --- a/Installers/Extras/Audio-Video/HandBrake.command +++ b/Installers/Extras/Audio-Video/HandBrake.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "HandBrake" "HandBrake.app" "http://downloads.sourceforge.net/project/handbrake/0.10.5/HandBrake-0.10.5-MacOSX.6_GUI_x86_64.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Audio-Video/Kodi.command b/Installers/Extras/Audio-Video/Kodi.command new file mode 100644 index 00000000..a9d5132d --- /dev/null +++ b/Installers/Extras/Audio-Video/Kodi.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Kodi" "Kodi.app" "http://mirrors.kodi.tv/releases/osx/x86_64/kodi-16.1-Jarvis-x86_64.dmg" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Audio-Video/Plex.command b/Installers/Extras/Audio-Video/Plex.command new file mode 100644 index 00000000..cc7cb53e --- /dev/null +++ b/Installers/Extras/Audio-Video/Plex.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "zip" "Plex" "Plex Media Server.app" "https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/PlexMediaServer-0.9.16.6.1993-5089475-OSX.zip" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Audio-Video/Spotify.command b/Installers/Extras/Audio-Video/Spotify.command index b5d99d0e..bb438fc5 100644 --- a/Installers/Extras/Audio-Video/Spotify.command +++ b/Installers/Extras/Audio-Video/Spotify.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Audio-Video/VLC.command b/Installers/Extras/Audio-Video/VLC.command index bc53b410..366012d7 100644 --- a/Installers/Extras/Audio-Video/VLC.command +++ b/Installers/Extras/Audio-Video/VLC.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Audio-Video/mpv.command b/Installers/Extras/Audio-Video/mpv.command index 240eefa1..0461182e 100644 --- a/Installers/Extras/Audio-Video/mpv.command +++ b/Installers/Extras/Audio-Video/mpv.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Browsers/Chrome & Firefox.command b/Installers/Extras/Browsers/Chrome & Firefox.command deleted file mode 100644 index 56aabcba..00000000 --- a/Installers/Extras/Browsers/Chrome & Firefox.command +++ /dev/null @@ -1,81 +0,0 @@ -#/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 deleted file mode 100644 index 1ab304de..00000000 --- a/Installers/Extras/Browsers/Chrome.command +++ /dev/null @@ -1,80 +0,0 @@ -#/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 index 652ec106..1d3c0fe8 100644 --- a/Installers/Extras/Browsers/Firefox.command +++ b/Installers/Extras/Browsers/Firefox.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest___os=osx___lang=en-US" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Browsers/Google Chrome.command b/Installers/Extras/Browsers/Google Chrome.command new file mode 100644 index 00000000..01d8b014 --- /dev/null +++ b/Installers/Extras/Browsers/Google Chrome.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Google Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Browsers/Opera.command b/Installers/Extras/Browsers/Opera.command index 3b03d843..104f6faa 100644 --- a/Installers/Extras/Browsers/Opera.command +++ b/Installers/Extras/Browsers/Opera.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Opera" "Opera.app" "http://get.geo.opera.com/pub/opera/desktop/39.0.2256.71/mac/Opera_39.0.2256.71_Setup.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Caffeine.command b/Installers/Extras/Caffeine.command index 177ccffc..a28dd462 100644 --- a/Installers/Extras/Caffeine.command +++ b/Installers/Extras/Caffeine.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "zip" "Caffeine" "caffeine.app" "http://download.lightheadsw.com/download.php?software=caffeine" "" "" "build" -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 +# Done +echo "" diff --git a/Installers/Extras/Calibre.command b/Installers/Extras/Calibre.command index e08ccf8f..524a6aa3 100644 --- a/Installers/Extras/Calibre.command +++ b/Installers/Extras/Calibre.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Calibre" "calibre.app" "http://status.calibre-ebook.com/dist/osx32" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/Dropbox.command b/Installers/Extras/Cloud/Dropbox.command index 61cd3454..91e373bf 100644 --- a/Installers/Extras/Cloud/Dropbox.command +++ b/Installers/Extras/Cloud/Dropbox.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Dropbox" "Dropbox.app" "https://www.dropbox.com/download?plat=mac" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/Evernote.command b/Installers/Extras/Cloud/Evernote.command index 235449e3..d13e4f9f 100644 --- a/Installers/Extras/Cloud/Evernote.command +++ b/Installers/Extras/Cloud/Evernote.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Evernote" "Evernote.app" "http://evernote.com/download/get.php?file=EvernoteMac" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/FileZilla.command b/Installers/Extras/Cloud/FileZilla.command new file mode 100644 index 00000000..394f631e --- /dev/null +++ b/Installers/Extras/Cloud/FileZilla.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "tar" "FileZilla" "FileZilla.app" "http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.21.0/FileZilla_3.21.0_macosx-x86.app.tar.bz2" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Cloud/Google Drive.command b/Installers/Extras/Cloud/Google Drive.command index 419f415c..9b11cff9 100644 --- a/Installers/Extras/Cloud/Google Drive.command +++ b/Installers/Extras/Cloud/Google Drive.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Google Drive" "Google Drive.app" "https://dl-ssl.google.com/drive/installgoogledrive.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/KeePassX.command b/Installers/Extras/Cloud/KeePassX.command index de8fb9cc..cd848f1b 100644 --- a/Installers/Extras/Cloud/KeePassX.command +++ b/Installers/Extras/Cloud/KeePassX.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "KeePassX" "KeePassX.app" "http://www.keepassx.org/releases/2.0.2/KeePassX-2.0.2.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/OmniFocus.command b/Installers/Extras/Cloud/OmniFocus.command index 50ad2d36..745d1bd8 100644 --- a/Installers/Extras/Cloud/OmniFocus.command +++ b/Installers/Extras/Cloud/OmniFocus.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "OmniFocus" "OmniFocus.app" "http://www.omnigroup.com/download/latest/omnifocus" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Cloud/Tunnelblick.command b/Installers/Extras/Cloud/Tunnelblick.command index 75283d6a..ca85a482 100644 --- a/Installers/Extras/Cloud/Tunnelblick.command +++ b/Installers/Extras/Cloud/Tunnelblick.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Tunnelblick" "Tunnelblick.app" "https://tunnelblick.net/release/Tunnelblick_3.6.7beta04_build_4601.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Communication/Adium.command b/Installers/Extras/Communication/Adium.command index 8c280125..a77fc5bf 100644 --- a/Installers/Extras/Communication/Adium.command +++ b/Installers/Extras/Communication/Adium.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Adium" "Adium.app" "https://adiumx.cachefly.net/Adium_1.5.10.2.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Communication/Skype.command b/Installers/Extras/Communication/Skype.command index c17cc913..92cf86ae 100644 --- a/Installers/Extras/Communication/Skype.command +++ b/Installers/Extras/Communication/Skype.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Skype" "Skype.app" "http://www.skype.com/go/getskype-macosx.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Communication/Slack.command b/Installers/Extras/Communication/Slack.command index a58adaff..cfc48c64 100644 --- a/Installers/Extras/Communication/Slack.command +++ b/Installers/Extras/Communication/Slack.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "zip" "Slack" "Slack.app" "https://slack.com/ssb/download-osx" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Compression/Keka.command b/Installers/Extras/Compression/Keka.command index a21736c6..415e4168 100644 --- a/Installers/Extras/Compression/Keka.command +++ b/Installers/Extras/Compression/Keka.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Keka" "Keka.app" "http://download.kekaosx.com/" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Compression/The Unarchiver.command b/Installers/Extras/Compression/The Unarchiver.command index 3184f574..881ac847 100644 --- a/Installers/Extras/Compression/The Unarchiver.command +++ b/Installers/Extras/Compression/The Unarchiver.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Compression/UnRarX.command b/Installers/Extras/Compression/UnRarX.command new file mode 100644 index 00000000..04624f59 --- /dev/null +++ b/Installers/Extras/Compression/UnRarX.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "zip" "UnRarX" "UnRarX.app" "http://www.unrarx.com/files/UnRarX_2.2.zip" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/DiskMaker X.command b/Installers/Extras/DiskMaker X.command deleted file mode 100644 index 49b21ff9..00000000 --- a/Installers/Extras/DiskMaker X.command +++ /dev/null @@ -1,80 +0,0 @@ -#/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 deleted file mode 100644 index 8bfeb389..00000000 --- a/Installers/Extras/FileZilla.command +++ /dev/null @@ -1,80 +0,0 @@ -#/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 deleted file mode 100644 index d44a8c76..00000000 --- a/Installers/Extras/Google Earth.command +++ /dev/null @@ -1,80 +0,0 @@ -#/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/GoogleEarth.command b/Installers/Extras/GoogleEarth.command new file mode 100644 index 00000000..5f5d0685 --- /dev/null +++ b/Installers/Extras/GoogleEarth.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "GoogleEarth" "Google Earth.app" "https://dl.google.com/earth/client/advanced/current/GoogleEarthMac-Intel.dmg" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Image-Photo/Flux.command b/Installers/Extras/Image-Photo/Flux.command index c11c8bf6..d0c6a030 100644 --- a/Installers/Extras/Image-Photo/Flux.command +++ b/Installers/Extras/Image-Photo/Flux.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "zip" "Flux" "Flux.app" "https://justgetflux.com/mac/Flux.zip" "" "" "build" -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 +# Done +echo "" diff --git a/Installers/Extras/Image-Photo/GIMP.command b/Installers/Extras/Image-Photo/GIMP.command index b343b203..5958cfd2 100644 --- a/Installers/Extras/Image-Photo/GIMP.command +++ b/Installers/Extras/Image-Photo/GIMP.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "GIMP" "GIMP.app" "http://download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-2.8.18-x86_64.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Image-Photo/Inkscape.command b/Installers/Extras/Image-Photo/Inkscape.command index bccfef6c..a1cda882 100644 --- a/Installers/Extras/Image-Photo/Inkscape.command +++ b/Installers/Extras/Image-Photo/Inkscape.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Inkscape" "Inkscape.app" "https://inkscape.org/en/gallery/item/3896/Inkscape-0.91-1-x11-10.7-x86_64.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Macs Fan Control.command b/Installers/Extras/Macs Fan Control.command new file mode 100644 index 00000000..bf28793e --- /dev/null +++ b/Installers/Extras/Macs Fan Control.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "zip" "Macs Fan Control" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Office/LibreOffice.command b/Installers/Extras/Office/LibreOffice.command index a21736c6..07951a1f 100644 --- a/Installers/Extras/Office/LibreOffice.command +++ b/Installers/Extras/Office/LibreOffice.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.1.5/mac/x86_64/LibreOffice_5.1.5_MacOS_x86-64.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Office/OpenOffice.command b/Installers/Extras/Office/OpenOffice.command index 50ad2d36..2cc6ce6a 100644 --- a/Installers/Extras/Office/OpenOffice.command +++ b/Installers/Extras/Office/OpenOffice.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "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" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Office/Thunderbird.command b/Installers/Extras/Office/Thunderbird.command index e25ad183..8dd1a83f 100644 --- a/Installers/Extras/Office/Thunderbird.command +++ b/Installers/Extras/Office/Thunderbird.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Thunderbird" "Thunderbird.app" "http://download.mozilla.org/?product=thunderbird-latest___os=osx___lang=en-US" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Security/BitDefender ART.command b/Installers/Extras/Security/BitDefender ART.command index 9634beb8..efffc24b 100644 --- a/Installers/Extras/Security/BitDefender ART.command +++ b/Installers/Extras/Security/BitDefender ART.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "zip" "BitDefender ART" "Adware Removal Tool.app" "http://download.bitdefender.com/mac/tools/Adware%20Removal%20Tool.zip" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/Security/ClamXav.command b/Installers/Extras/Security/ClamXav.command new file mode 100644 index 00000000..10650203 --- /dev/null +++ b/Installers/Extras/Security/ClamXav.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "ClamXav" "ClamXav.app" "http://www.clamxav.com/downloads/ClamXav_2.9.2_2478.zip" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Security/Malwarebytes Anti-Malware.command b/Installers/Extras/Security/Malwarebytes Anti-Malware.command new file mode 100644 index 00000000..663d934c --- /dev/null +++ b/Installers/Extras/Security/Malwarebytes Anti-Malware.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Malwarebytes Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/Security/Malwarebytes.command b/Installers/Extras/Security/Malwarebytes.command deleted file mode 100644 index e0225730..00000000 --- a/Installers/Extras/Security/Malwarebytes.command +++ /dev/null @@ -1,80 +0,0 @@ -#/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 index 82c7b2e5..0cee1d60 100644 --- a/Installers/Extras/Steam.command +++ b/Installers/Extras/Steam.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Steam" "Steam.app" "http://media.steampowered.com/client/installer/steam.dmg" "" "" "build" -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 +# Done +echo "" diff --git a/Installers/Extras/TeamViewerQS.command b/Installers/Extras/TeamViewerQS.command index 0bb04c91..0dd1b273 100644 --- a/Installers/Extras/TeamViewerQS.command +++ b/Installers/Extras/TeamViewerQS.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "TeamViewerQS" "TeamViewerQS.app" "http://download.teamviewer.com/download/TeamViewerQS.dmg" "" "" "" -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 +# Done +echo "" diff --git a/Installers/Extras/gfxCardStatus.command b/Installers/Extras/gfxCardStatus.command new file mode 100644 index 00000000..db3abc83 --- /dev/null +++ b/Installers/Extras/gfxCardStatus.command @@ -0,0 +1,27 @@ +#!/bin/bash + +# Init +BIN="" +clear + +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi + +# Install App(s) +"$BIN/Scripts/install_app" "zip" "gfxCardStatus" "gfxCardStatus.app" "http://gfx.io/downloads/gfxCardStatus-2.3.zip" "" "" "" + +# Done +echo "" diff --git a/Installers/Extras/iTerm2.command b/Installers/Extras/iTerm2.command index 9c83bb0f..f9e41eb0 100644 --- a/Installers/Extras/iTerm2.command +++ b/Installers/Extras/iTerm2.command @@ -1,80 +1,27 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" "" -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 +# Done +echo "" diff --git a/Installers/OS X.command b/Installers/OS X.command index 8ba1beff..a808d0c9 100644 --- a/Installers/OS X.command +++ b/Installers/OS X.command @@ -1,87 +1,34 @@ -#/bin/bash -clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps +#!/bin/bash -############################### -# Print script header # -############################### -echo $" +# Init +BIN="" +clear - ███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗ - ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ - ██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗ - ██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ - ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗ - ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n" - +# Find BIN path +pushd . > /dev/null +cd "$(dirname "$0")" +while [ "$(pwd)" != "/" ]; do + if [ -d ".bin" ]; then + BIN="$(pwd)/.bin" + break + fi + cd .. +done +popd > /dev/null +if [ "$BIN" == "" ]; then + echo ".bin not found" + exit 1 +fi -############################### -# 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" -} +# Install App(s) +"$BIN/Scripts/install_app" "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" "" +"$BIN/Scripts/install_app" "dmg" "Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" "" +"$BIN/Scripts/install_app" "dmg" "MBAM" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" "" +"$BIN/Scripts/install_app" "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" "" +"$BIN/Scripts/install_app" "zip" "macsfancontrol" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" "" +"$BIN/Scripts/install_app" "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" "" +"$BIN/Scripts/install_app" "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" "" +"$BIN/Scripts/install_app" "tgz" "mpv" "mpv.app" "https://laboratory.stolendata.net/~djinn/mpv_osx/mpv-latest.tar.gz" "" "" "" -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 +# Done +echo "" From 49564301960360a7ce0fb2a83a3d526e14a749bf Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Mon, 4 Dec 2017 16:57:19 -0800 Subject: [PATCH 4/4] Prep for merge into main repo --- {.bin => .macos_items/.bin}/Scripts/diagnostics | 0 {.bin => .macos_items/.bin}/Scripts/install_app | 0 {.bin => .macos_items/.bin}/_templates/create_installers | 0 {.bin => .macos_items/.bin}/_templates/install.command | 0 .gitignore => .macos_items/.gitignore | 0 Diagnostics.command => .macos_items/Diagnostics.command | 0 .../Diagnostics}/Disk Inventory X.command | 0 Enable TRIM.command => .macos_items/Enable TRIM.command | 0 {Installers => .macos_items/Installers}/BackBlaze.url | 0 .../Installers}/Extras/Audio-Video/HandBrake.command | 0 .../Installers}/Extras/Audio-Video/Kodi.command | 0 .../Installers}/Extras/Audio-Video/Plex.command | 0 .../Installers}/Extras/Audio-Video/Spotify.command | 0 .../Installers}/Extras/Audio-Video/VLC.command | 0 .../Installers}/Extras/Audio-Video/mpv.command | 0 .../Installers}/Extras/Browsers/Firefox.command | 0 .../Installers}/Extras/Browsers/Google Chrome.command | 0 .../Installers}/Extras/Browsers/Opera.command | 0 {Installers => .macos_items/Installers}/Extras/Caffeine.command | 0 {Installers => .macos_items/Installers}/Extras/Calibre.command | 0 .../Installers}/Extras/Cloud/Dropbox.command | 0 .../Installers}/Extras/Cloud/Evernote.command | 0 .../Installers}/Extras/Cloud/FileZilla.command | 0 .../Installers}/Extras/Cloud/Google Drive.command | 0 .../Installers}/Extras/Cloud/KeePassX.command | 0 .../Installers}/Extras/Cloud/OmniFocus.command | 0 .../Installers}/Extras/Cloud/Tunnelblick.command | 0 .../Installers}/Extras/Communication/Adium.command | 0 .../Installers}/Extras/Communication/Skype.command | 0 .../Installers}/Extras/Communication/Slack.command | 0 .../Installers}/Extras/Compression/Keka.command | 0 .../Installers}/Extras/Compression/The Unarchiver.command | 0 .../Installers}/Extras/Compression/UnRarX.command | 0 .../Installers}/Extras/GoogleEarth.command | 0 .../Installers}/Extras/Image-Photo/Flux.command | 0 .../Installers}/Extras/Image-Photo/GIMP.command | 0 .../Installers}/Extras/Image-Photo/Inkscape.command | 0 .../Installers}/Extras/Macs Fan Control.command | 0 .../Installers}/Extras/Office/LibreOffice.command | 0 .../Installers}/Extras/Office/OpenOffice.command | 0 .../Installers}/Extras/Office/Thunderbird.command | 0 .../Installers}/Extras/Security/BitDefender ART.command | 0 .../Installers}/Extras/Security/ClamXav.command | 0 .../Extras/Security/Malwarebytes Anti-Malware.command | 0 {Installers => .macos_items/Installers}/Extras/Steam.command | 0 .../Installers}/Extras/TeamViewerQS.command | 0 .../Installers}/Extras/gfxCardStatus.command | 0 {Installers => .macos_items/Installers}/Extras/iTerm2.command | 0 {Installers => .macos_items/Installers}/OS X.command | 0 {OSR & VR => .macos_items/OSR & VR}/Malwarebytes.command | 0 LICENSE.txt | 2 +- 51 files changed, 1 insertion(+), 1 deletion(-) rename {.bin => .macos_items/.bin}/Scripts/diagnostics (100%) rename {.bin => .macos_items/.bin}/Scripts/install_app (100%) rename {.bin => .macos_items/.bin}/_templates/create_installers (100%) rename {.bin => .macos_items/.bin}/_templates/install.command (100%) rename .gitignore => .macos_items/.gitignore (100%) rename Diagnostics.command => .macos_items/Diagnostics.command (100%) rename {Diagnostics => .macos_items/Diagnostics}/Disk Inventory X.command (100%) rename Enable TRIM.command => .macos_items/Enable TRIM.command (100%) rename {Installers => .macos_items/Installers}/BackBlaze.url (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/HandBrake.command (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/Kodi.command (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/Plex.command (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/Spotify.command (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/VLC.command (100%) rename {Installers => .macos_items/Installers}/Extras/Audio-Video/mpv.command (100%) rename {Installers => .macos_items/Installers}/Extras/Browsers/Firefox.command (100%) rename {Installers => .macos_items/Installers}/Extras/Browsers/Google Chrome.command (100%) rename {Installers => .macos_items/Installers}/Extras/Browsers/Opera.command (100%) rename {Installers => .macos_items/Installers}/Extras/Caffeine.command (100%) rename {Installers => .macos_items/Installers}/Extras/Calibre.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/Dropbox.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/Evernote.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/FileZilla.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/Google Drive.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/KeePassX.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/OmniFocus.command (100%) rename {Installers => .macos_items/Installers}/Extras/Cloud/Tunnelblick.command (100%) rename {Installers => .macos_items/Installers}/Extras/Communication/Adium.command (100%) rename {Installers => .macos_items/Installers}/Extras/Communication/Skype.command (100%) rename {Installers => .macos_items/Installers}/Extras/Communication/Slack.command (100%) rename {Installers => .macos_items/Installers}/Extras/Compression/Keka.command (100%) rename {Installers => .macos_items/Installers}/Extras/Compression/The Unarchiver.command (100%) rename {Installers => .macos_items/Installers}/Extras/Compression/UnRarX.command (100%) rename {Installers => .macos_items/Installers}/Extras/GoogleEarth.command (100%) rename {Installers => .macos_items/Installers}/Extras/Image-Photo/Flux.command (100%) rename {Installers => .macos_items/Installers}/Extras/Image-Photo/GIMP.command (100%) rename {Installers => .macos_items/Installers}/Extras/Image-Photo/Inkscape.command (100%) rename {Installers => .macos_items/Installers}/Extras/Macs Fan Control.command (100%) rename {Installers => .macos_items/Installers}/Extras/Office/LibreOffice.command (100%) rename {Installers => .macos_items/Installers}/Extras/Office/OpenOffice.command (100%) rename {Installers => .macos_items/Installers}/Extras/Office/Thunderbird.command (100%) rename {Installers => .macos_items/Installers}/Extras/Security/BitDefender ART.command (100%) rename {Installers => .macos_items/Installers}/Extras/Security/ClamXav.command (100%) rename {Installers => .macos_items/Installers}/Extras/Security/Malwarebytes Anti-Malware.command (100%) rename {Installers => .macos_items/Installers}/Extras/Steam.command (100%) rename {Installers => .macos_items/Installers}/Extras/TeamViewerQS.command (100%) rename {Installers => .macos_items/Installers}/Extras/gfxCardStatus.command (100%) rename {Installers => .macos_items/Installers}/Extras/iTerm2.command (100%) rename {Installers => .macos_items/Installers}/OS X.command (100%) rename {OSR & VR => .macos_items/OSR & VR}/Malwarebytes.command (100%) diff --git a/.bin/Scripts/diagnostics b/.macos_items/.bin/Scripts/diagnostics similarity index 100% rename from .bin/Scripts/diagnostics rename to .macos_items/.bin/Scripts/diagnostics diff --git a/.bin/Scripts/install_app b/.macos_items/.bin/Scripts/install_app similarity index 100% rename from .bin/Scripts/install_app rename to .macos_items/.bin/Scripts/install_app diff --git a/.bin/_templates/create_installers b/.macos_items/.bin/_templates/create_installers similarity index 100% rename from .bin/_templates/create_installers rename to .macos_items/.bin/_templates/create_installers diff --git a/.bin/_templates/install.command b/.macos_items/.bin/_templates/install.command similarity index 100% rename from .bin/_templates/install.command rename to .macos_items/.bin/_templates/install.command diff --git a/.gitignore b/.macos_items/.gitignore similarity index 100% rename from .gitignore rename to .macos_items/.gitignore diff --git a/Diagnostics.command b/.macos_items/Diagnostics.command similarity index 100% rename from Diagnostics.command rename to .macos_items/Diagnostics.command diff --git a/Diagnostics/Disk Inventory X.command b/.macos_items/Diagnostics/Disk Inventory X.command similarity index 100% rename from Diagnostics/Disk Inventory X.command rename to .macos_items/Diagnostics/Disk Inventory X.command diff --git a/Enable TRIM.command b/.macos_items/Enable TRIM.command similarity index 100% rename from Enable TRIM.command rename to .macos_items/Enable TRIM.command diff --git a/Installers/BackBlaze.url b/.macos_items/Installers/BackBlaze.url similarity index 100% rename from Installers/BackBlaze.url rename to .macos_items/Installers/BackBlaze.url diff --git a/Installers/Extras/Audio-Video/HandBrake.command b/.macos_items/Installers/Extras/Audio-Video/HandBrake.command similarity index 100% rename from Installers/Extras/Audio-Video/HandBrake.command rename to .macos_items/Installers/Extras/Audio-Video/HandBrake.command diff --git a/Installers/Extras/Audio-Video/Kodi.command b/.macos_items/Installers/Extras/Audio-Video/Kodi.command similarity index 100% rename from Installers/Extras/Audio-Video/Kodi.command rename to .macos_items/Installers/Extras/Audio-Video/Kodi.command diff --git a/Installers/Extras/Audio-Video/Plex.command b/.macos_items/Installers/Extras/Audio-Video/Plex.command similarity index 100% rename from Installers/Extras/Audio-Video/Plex.command rename to .macos_items/Installers/Extras/Audio-Video/Plex.command diff --git a/Installers/Extras/Audio-Video/Spotify.command b/.macos_items/Installers/Extras/Audio-Video/Spotify.command similarity index 100% rename from Installers/Extras/Audio-Video/Spotify.command rename to .macos_items/Installers/Extras/Audio-Video/Spotify.command diff --git a/Installers/Extras/Audio-Video/VLC.command b/.macos_items/Installers/Extras/Audio-Video/VLC.command similarity index 100% rename from Installers/Extras/Audio-Video/VLC.command rename to .macos_items/Installers/Extras/Audio-Video/VLC.command diff --git a/Installers/Extras/Audio-Video/mpv.command b/.macos_items/Installers/Extras/Audio-Video/mpv.command similarity index 100% rename from Installers/Extras/Audio-Video/mpv.command rename to .macos_items/Installers/Extras/Audio-Video/mpv.command diff --git a/Installers/Extras/Browsers/Firefox.command b/.macos_items/Installers/Extras/Browsers/Firefox.command similarity index 100% rename from Installers/Extras/Browsers/Firefox.command rename to .macos_items/Installers/Extras/Browsers/Firefox.command diff --git a/Installers/Extras/Browsers/Google Chrome.command b/.macos_items/Installers/Extras/Browsers/Google Chrome.command similarity index 100% rename from Installers/Extras/Browsers/Google Chrome.command rename to .macos_items/Installers/Extras/Browsers/Google Chrome.command diff --git a/Installers/Extras/Browsers/Opera.command b/.macos_items/Installers/Extras/Browsers/Opera.command similarity index 100% rename from Installers/Extras/Browsers/Opera.command rename to .macos_items/Installers/Extras/Browsers/Opera.command diff --git a/Installers/Extras/Caffeine.command b/.macos_items/Installers/Extras/Caffeine.command similarity index 100% rename from Installers/Extras/Caffeine.command rename to .macos_items/Installers/Extras/Caffeine.command diff --git a/Installers/Extras/Calibre.command b/.macos_items/Installers/Extras/Calibre.command similarity index 100% rename from Installers/Extras/Calibre.command rename to .macos_items/Installers/Extras/Calibre.command diff --git a/Installers/Extras/Cloud/Dropbox.command b/.macos_items/Installers/Extras/Cloud/Dropbox.command similarity index 100% rename from Installers/Extras/Cloud/Dropbox.command rename to .macos_items/Installers/Extras/Cloud/Dropbox.command diff --git a/Installers/Extras/Cloud/Evernote.command b/.macos_items/Installers/Extras/Cloud/Evernote.command similarity index 100% rename from Installers/Extras/Cloud/Evernote.command rename to .macos_items/Installers/Extras/Cloud/Evernote.command diff --git a/Installers/Extras/Cloud/FileZilla.command b/.macos_items/Installers/Extras/Cloud/FileZilla.command similarity index 100% rename from Installers/Extras/Cloud/FileZilla.command rename to .macos_items/Installers/Extras/Cloud/FileZilla.command diff --git a/Installers/Extras/Cloud/Google Drive.command b/.macos_items/Installers/Extras/Cloud/Google Drive.command similarity index 100% rename from Installers/Extras/Cloud/Google Drive.command rename to .macos_items/Installers/Extras/Cloud/Google Drive.command diff --git a/Installers/Extras/Cloud/KeePassX.command b/.macos_items/Installers/Extras/Cloud/KeePassX.command similarity index 100% rename from Installers/Extras/Cloud/KeePassX.command rename to .macos_items/Installers/Extras/Cloud/KeePassX.command diff --git a/Installers/Extras/Cloud/OmniFocus.command b/.macos_items/Installers/Extras/Cloud/OmniFocus.command similarity index 100% rename from Installers/Extras/Cloud/OmniFocus.command rename to .macos_items/Installers/Extras/Cloud/OmniFocus.command diff --git a/Installers/Extras/Cloud/Tunnelblick.command b/.macos_items/Installers/Extras/Cloud/Tunnelblick.command similarity index 100% rename from Installers/Extras/Cloud/Tunnelblick.command rename to .macos_items/Installers/Extras/Cloud/Tunnelblick.command diff --git a/Installers/Extras/Communication/Adium.command b/.macos_items/Installers/Extras/Communication/Adium.command similarity index 100% rename from Installers/Extras/Communication/Adium.command rename to .macos_items/Installers/Extras/Communication/Adium.command diff --git a/Installers/Extras/Communication/Skype.command b/.macos_items/Installers/Extras/Communication/Skype.command similarity index 100% rename from Installers/Extras/Communication/Skype.command rename to .macos_items/Installers/Extras/Communication/Skype.command diff --git a/Installers/Extras/Communication/Slack.command b/.macos_items/Installers/Extras/Communication/Slack.command similarity index 100% rename from Installers/Extras/Communication/Slack.command rename to .macos_items/Installers/Extras/Communication/Slack.command diff --git a/Installers/Extras/Compression/Keka.command b/.macos_items/Installers/Extras/Compression/Keka.command similarity index 100% rename from Installers/Extras/Compression/Keka.command rename to .macos_items/Installers/Extras/Compression/Keka.command diff --git a/Installers/Extras/Compression/The Unarchiver.command b/.macos_items/Installers/Extras/Compression/The Unarchiver.command similarity index 100% rename from Installers/Extras/Compression/The Unarchiver.command rename to .macos_items/Installers/Extras/Compression/The Unarchiver.command diff --git a/Installers/Extras/Compression/UnRarX.command b/.macos_items/Installers/Extras/Compression/UnRarX.command similarity index 100% rename from Installers/Extras/Compression/UnRarX.command rename to .macos_items/Installers/Extras/Compression/UnRarX.command diff --git a/Installers/Extras/GoogleEarth.command b/.macos_items/Installers/Extras/GoogleEarth.command similarity index 100% rename from Installers/Extras/GoogleEarth.command rename to .macos_items/Installers/Extras/GoogleEarth.command diff --git a/Installers/Extras/Image-Photo/Flux.command b/.macos_items/Installers/Extras/Image-Photo/Flux.command similarity index 100% rename from Installers/Extras/Image-Photo/Flux.command rename to .macos_items/Installers/Extras/Image-Photo/Flux.command diff --git a/Installers/Extras/Image-Photo/GIMP.command b/.macos_items/Installers/Extras/Image-Photo/GIMP.command similarity index 100% rename from Installers/Extras/Image-Photo/GIMP.command rename to .macos_items/Installers/Extras/Image-Photo/GIMP.command diff --git a/Installers/Extras/Image-Photo/Inkscape.command b/.macos_items/Installers/Extras/Image-Photo/Inkscape.command similarity index 100% rename from Installers/Extras/Image-Photo/Inkscape.command rename to .macos_items/Installers/Extras/Image-Photo/Inkscape.command diff --git a/Installers/Extras/Macs Fan Control.command b/.macos_items/Installers/Extras/Macs Fan Control.command similarity index 100% rename from Installers/Extras/Macs Fan Control.command rename to .macos_items/Installers/Extras/Macs Fan Control.command diff --git a/Installers/Extras/Office/LibreOffice.command b/.macos_items/Installers/Extras/Office/LibreOffice.command similarity index 100% rename from Installers/Extras/Office/LibreOffice.command rename to .macos_items/Installers/Extras/Office/LibreOffice.command diff --git a/Installers/Extras/Office/OpenOffice.command b/.macos_items/Installers/Extras/Office/OpenOffice.command similarity index 100% rename from Installers/Extras/Office/OpenOffice.command rename to .macos_items/Installers/Extras/Office/OpenOffice.command diff --git a/Installers/Extras/Office/Thunderbird.command b/.macos_items/Installers/Extras/Office/Thunderbird.command similarity index 100% rename from Installers/Extras/Office/Thunderbird.command rename to .macos_items/Installers/Extras/Office/Thunderbird.command diff --git a/Installers/Extras/Security/BitDefender ART.command b/.macos_items/Installers/Extras/Security/BitDefender ART.command similarity index 100% rename from Installers/Extras/Security/BitDefender ART.command rename to .macos_items/Installers/Extras/Security/BitDefender ART.command diff --git a/Installers/Extras/Security/ClamXav.command b/.macos_items/Installers/Extras/Security/ClamXav.command similarity index 100% rename from Installers/Extras/Security/ClamXav.command rename to .macos_items/Installers/Extras/Security/ClamXav.command diff --git a/Installers/Extras/Security/Malwarebytes Anti-Malware.command b/.macos_items/Installers/Extras/Security/Malwarebytes Anti-Malware.command similarity index 100% rename from Installers/Extras/Security/Malwarebytes Anti-Malware.command rename to .macos_items/Installers/Extras/Security/Malwarebytes Anti-Malware.command diff --git a/Installers/Extras/Steam.command b/.macos_items/Installers/Extras/Steam.command similarity index 100% rename from Installers/Extras/Steam.command rename to .macos_items/Installers/Extras/Steam.command diff --git a/Installers/Extras/TeamViewerQS.command b/.macos_items/Installers/Extras/TeamViewerQS.command similarity index 100% rename from Installers/Extras/TeamViewerQS.command rename to .macos_items/Installers/Extras/TeamViewerQS.command diff --git a/Installers/Extras/gfxCardStatus.command b/.macos_items/Installers/Extras/gfxCardStatus.command similarity index 100% rename from Installers/Extras/gfxCardStatus.command rename to .macos_items/Installers/Extras/gfxCardStatus.command diff --git a/Installers/Extras/iTerm2.command b/.macos_items/Installers/Extras/iTerm2.command similarity index 100% rename from Installers/Extras/iTerm2.command rename to .macos_items/Installers/Extras/iTerm2.command diff --git a/Installers/OS X.command b/.macos_items/Installers/OS X.command similarity index 100% rename from Installers/OS X.command rename to .macos_items/Installers/OS X.command diff --git a/OSR & VR/Malwarebytes.command b/.macos_items/OSR & VR/Malwarebytes.command similarity index 100% rename from OSR & VR/Malwarebytes.command rename to .macos_items/OSR & VR/Malwarebytes.command diff --git a/LICENSE.txt b/LICENSE.txt index 7734ae70..7caf44d1 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2016 Alan Mason +Copyright (c) 2017 Alan Mason Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: