You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
735 B

4 years ago
#!/bin/sh
install() {
sudo xcode-select --install || exit 1
/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
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" || exit 1
}
upgrade() {
brew upgrade || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" --upgrade || exit 1
}
set -o nounset
installToolsPath="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)"
4 years ago
if [ "${1}" = "--upgrade" ]; then
4 years ago
upgrade
elif [ -z "${1}" ]; then
install
else
echo "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages."
exit 1
fi
exit 0