adding script to ignore missing packages with apt
This commit is contained in:
parent
fea2bbd11c
commit
a7f5999cf0
14
install-with-apt.sh
Normal file
14
install-with-apt.sh
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user