|
@ -13,12 +13,12 @@ function usage() { |
|
|
|
|
|
|
|
|
if [ "$(date --date='-12 hours' +%s)" -gt "$(date -d "$(stat -c %y /var/lib/apt/lists/partial)" +%s)" ]; then |
|
|
if [ "$(date --date='-12 hours' +%s)" -gt "$(date -d "$(stat -c %y /var/lib/apt/lists/partial)" +%s)" ]; then |
|
|
echo "updating repositoring..." |
|
|
echo "updating repositoring..." |
|
|
apt update |
|
|
|
|
|
|
|
|
apt-get update |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
for i in "$@"; do |
|
|
for i in "$@"; do |
|
|
if ! dpkg -l "$i" 2>/dev/null | grep -q ^ii; then |
|
|
if ! dpkg -l "$i" 2>/dev/null | grep -q ^ii; then |
|
|
sudo apt install -y "$i" |
|
|
|
|
|
|
|
|
sudo apt-get install -y "$i" |
|
|
elif [ -n "${VERBOSE+x}" ] && $VERBOSE; then |
|
|
elif [ -n "${VERBOSE+x}" ] && $VERBOSE; then |
|
|
echo "apt package <$i> already installed!" |
|
|
echo "apt package <$i> already installed!" |
|
|
fi |
|
|
fi |
|
|