diff --git a/install-with-apt.sh b/install-with-apt.sh new file mode 100644 index 0000000..a999ef5 --- /dev/null +++ b/install-with-apt.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# This installs packages one by one with apt in the event packages don't exist. +#Check whether root +if [ $(whoami) != root ]; then + echo You must be root or use sudo to install packages. + return +fi + +#Call apt-get for each package +for pkg in "$@" +do + sudo apt-get -my install $pkg +done +