summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-07-01 09:26:27 +0200
committerAllan McRae <allan@archlinux.org>2009-07-11 17:02:21 +0200
commit68c10690eae369928b6cdc2d658588ad06e4b1a5 (patch)
tree64f1d97d4a12465ecfd3fa5914d81708f2a87306 /scripts
parent8d7764abaecb89a5baa6b4afe25f4db8e8a40465 (diff)
downloadpacman-68c10690eae369928b6cdc2d658588ad06e4b1a5.tar.gz
pacman-68c10690eae369928b6cdc2d658588ad06e4b1a5.tar.xz
makepkg: quote filenames when extracting
We currently fall apart on files with spaces in the names. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in12
1 files changed, 6 insertions, 6 deletions
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...")"