set -e does not work for subshells so failure of ar in

( cd /tmp && ar -x tar.deb data.tar.gz )

did not stop the execution of install.sh.
---
 install.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/install.sh b/install.sh
index ba09e7e..2f99b89 100755
--- a/install.sh
+++ b/install.sh
@@ -650,6 +650,10 @@ action_testing () {
                wget $TAR_PACKAGE -O /tmp/tar.deb
                rm -f /tmp/data.tar.gz # FIXME: ar should just overwrite it
                ( cd /tmp && ar -x tar.deb data.tar.gz )
+               if [ ! -e /tmp/data.tar.gz ]; then
+                   echo "E: failed to extract data.tar.gz from $TAR_PACKAGE"
+                   exit 1
+               fi
                mkdir -p /usr/local
                gunzip -c /tmp/data.tar.gz | $TAR_APPLICATION -x -C /usr/local/
                TAR_APPLICATION=/usr/local/bin/tar
-- 
1.7.2.3


_______________________________________________
pkg-fso-maint mailing list
pkg-fso-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-fso-maint

Reply via email to