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.
 
 
 
 

35 lines
701 B

#!/bin/sh
install() {
cat "${installToolsPath}/PackageListAPT.txt" | xargs sudo apt-get install -y || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" || exit 1
}
upgrade() {
sudo apt-get upgrade
cat "${installToolsPath}/PackageListAPT.txt" | xargs sudo apt-get upgrade -y || 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)"
if [ "${1}" = "--upgrade" ]; then
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