This commit is contained in:
Alarig Le Lay 2018-08-01 12:00:35 +02:00
parent bab9aba98c
commit 5068f20983

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}