Update file run_onchange_before_10_install-ubuntu-dependencies.tmpl

This commit is contained in:
Brian Zalewski 2022-12-25 08:58:13 +00:00
parent 2834c4d7a4
commit 8cbdc6d545

View file

@ -16,5 +16,14 @@
logg 'Installing common dependencies using `apt-get`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
logg info 'Running `sudo apt-get update`'
sudo apt-get update
echo {{ $packages | sortAlpha | uniq | join " " -}} | xargs -n 1 sudo apt-get install -y --no-install-recommends
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'`'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done