This commit is contained in:
Alarig Le Lay 2018-08-01 12:00:35 +02:00
parent bab9aba98c
commit 5068f20983
1 changed files with 15 additions and 0 deletions

15
automatic_pkg_upgrade.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
TMP_FILE=$(mktemp)
pkg upgrade -n -q > ${TMP_FILE}
if [ "$(cat ${TMP_FILE})" != "" ]; then
if [ "$(grep REMOVED ${TMP_FILE})" = "" ]; then
pkg upgrade -y
else
cat ${TMP_FILE}
fi
fi
rm ${TMP_FILE}