diff --git a/Scripts/Install/InstallDarwin.sh b/Scripts/Install/InstallDarwin.sh index 4e3011a..4c81fcb 100755 --- a/Scripts/Install/InstallDarwin.sh +++ b/Scripts/Install/InstallDarwin.sh @@ -2,19 +2,18 @@ install() { - sudo xcode-select --install || exit 1 + sudo xcode-select --install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || exit 1 - brew install python git cmake libsodium openssl || exit 1 + xargs brew install < "${installToolsPath}/PackageListBrew.txt" || exit 1 sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" || exit 1 - } upgrade() { - brew upgrade || exit 1 + xargs brew upgrade < "${installToolsPath}/PackageListBrew.txt" || exit 1 sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" --upgrade || exit 1 @@ -24,9 +23,9 @@ set -o nounset installToolsPath="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" -if [ "${1}" = "--upgrade" ]; then +if [ "${1-}" = "--upgrade" ]; then upgrade -elif [ -z "${1}" ]; then +elif [ -z "${1-}" ]; then install else echo "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages." diff --git a/Scripts/Install/InstallLinux.sh b/Scripts/Install/InstallLinux.sh index b710324..1972c40 100755 --- a/Scripts/Install/InstallLinux.sh +++ b/Scripts/Install/InstallLinux.sh @@ -22,9 +22,9 @@ set -o nounset installToolsPath="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" -if [ "${1}" = "--upgrade" ]; then +if [ "${1-}" = "--upgrade" ]; then upgrade -elif [ -z "${1}" ]; then +elif [ -z "${1-}" ]; then install else echo "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages." diff --git a/Scripts/Install/PackageListBrew.txt b/Scripts/Install/PackageListBrew.txt index 10261cb..91cc448 100644 --- a/Scripts/Install/PackageListBrew.txt +++ b/Scripts/Install/PackageListBrew.txt @@ -2,4 +2,4 @@ cmake git libsodium openssl -python \ No newline at end of file +python