diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-13 21:07:03 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-13 21:07:03 +0100 |
commit | 3f0d2fc9cf63a274776efc0c653f1e9d30e53183 (patch) | |
tree | a7f9187ada5e4118c5ca82eaecf2200199829b4a | |
parent | d20054bb73b32fe29ef779959e055064a3335a92 (diff) | |
download | itzks-install-script-3f0d2fc9cf63a274776efc0c653f1e9d30e53183.tar.gz itzks-install-script-3f0d2fc9cf63a274776efc0c653f1e9d30e53183.tar.bz2 itzks-install-script-3f0d2fc9cf63a274776efc0c653f1e9d30e53183.zip |
apt_install_if_not: Catch apt-get exit code and return that.
-rwxr-xr-x | install-itzks-workstation | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation index 575c61d..3063168 100755 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -13,7 +13,11 @@ function apt_install_if_not() { for pkg in $pkgs; do [ -d "/usr/share/doc/$pkg" ] || install_pkgs="$install_pkgs $pkg" done + set +e test -n "$install_pkgs" && apt-get install -y $install_pkgs + ret=$? + set -e + return $ret } # Add user locadm if not already there |