From 68c10690eae369928b6cdc2d658588ad06e4b1a5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 1 Jul 2009 02:26:27 -0500 Subject: makepkg: quote filenames when extracting We currently fall apart on files with spaces in the names. Signed-off-by: Dan McGee Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4d4ec369..fd98a5e7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -644,13 +644,13 @@ extract_sources() { local cmd='' case "$file_type" in *application/x-tar*|*application/zip*|*application/x-zip*|*application/x-cpio*) - cmd="bsdtar -x -f $file" ;; + cmd="bsdtar -x -f" ;; *application/x-gzip*) - cmd="gunzip -d -f $file" ;; + cmd="gunzip -d -f" ;; *application/x-bzip*) - cmd="bunzip2 -f $file" ;; + cmd="bunzip2 -f" ;; *application/x-xz*) - cmd="xz -d -f $file" ;; + cmd="xz -d -f" ;; *) # Don't know what to use to extract this file, # skip to the next file @@ -658,8 +658,8 @@ extract_sources() { esac local ret=0 - msg2 "$cmd" - $cmd || ret=$? + msg2 "$cmd \"$file\"" + $cmd "$file" || ret=$? if [ $ret -ne 0 ]; then error "$(gettext "Failed to extract %s")" "$file" plain "$(gettext "Aborting...")" -- cgit v1.2.3-70-g09d2