diff --git a/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl b/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl index 1fcd77d9..a9571066 100644 --- a/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl +++ b/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl @@ -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