From f6b8ed22f40d422e2876be92b215187b5ff7b6e7 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sun, 19 Dec 2004 03:37:00 +0000 Subject: Imported from pacman-2.9.3.tar.gz --- scripts/makepkg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts/makepkg') diff --git a/scripts/makepkg b/scripts/makepkg index efc750d2..a4c4d23a 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -463,6 +463,7 @@ if [ "$GENMD5" = "0" ]; then # extract sources msg "Extracting Sources..." for netfile in ${source[@]}; do + unziphack=0 file=`strip_url $netfile` unset cmd case $file in @@ -473,6 +474,7 @@ if [ "$GENMD5" = "0" ]; then *.tar) cmd="tar -xf $file" ;; *.zip) + unziphack=1 cmd="unzip -qqo $file" ;; *.gz) cmd="gunzip $file" ;; @@ -483,9 +485,12 @@ if [ "$GENMD5" = "0" ]; then msg " $cmd" $cmd if [ $? -ne 0 ]; then - error "Failed to extract $file" - msg "Aborting..." - exit 1 + # unzip will return a 1 as a warning, it is not an error + if [ "$unziphack" != "1" -o $? -ne 1 ]; then + error "Failed to extract $file" + msg "Aborting..." + exit 1 + fi fi fi done -- cgit v1.2.3-24-g4f1b