[pkg-fso-maint] [PATCH 1/2] Give an error message if data.tar.gz can not be extracted from tar*.deb
Timo Juhani Lindfors
timo.lindfors at iki.fi
Fri Dec 24 22:10:01 UTC 2010
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
More information about the pkg-fso-maint
mailing list