install packages before we do anything else

This commit is contained in:
Aaron Bieber 2019-10-23 17:11:19 -06:00
parent ff6597b832
commit 8e5b94d176
Signed by: qbit
GPG Key ID: 279160AB1BE1236B

View File

@ -210,6 +210,13 @@ _ssh() {
V=$(expand_v)
if [ -f ./packages ]; then
msg 0 "installing $(wc -l packages | awk '{print $1 " " $2}')"
cmd=$(printf "${PKG_DIFF_INSTALL}" $V $V)
_scp packages "${RUN_USER}@${SERVER}:/etc/packages.tmp"
_ssh ${RUN_USER}@${SERVER} "${cmd}"
fi
if [ -f ./groups ]; then
msg 0 "adding $(wc -l groups | awk '{print $1 " " $2}')"
for group in $(cat groups); do
@ -279,13 +286,6 @@ EOF
done
fi
if [ -f ./packages ]; then
msg 0 "installing $(wc -l packages | awk '{print $1 " " $2}')"
cmd=$(printf "${PKG_DIFF_INSTALL}" $V $V)
_scp packages "${RUN_USER}@${SERVER}:/etc/packages.tmp"
_ssh ${RUN_USER}@${SERVER} "${cmd}"
fi
if [ $MAINTENANCE == 1 ]; then
msg 0 "cleaning up unused packages"
_ssh ${RUN_USER}@${SERVER} "/usr/sbin/pkg_delete $V -a"