[pacman-dev] [PATCH] makepkg: quote all uses of BUILDSCRIPT
Allan McRae
allan at archlinux.org
Fri Dec 26 02:55:54 EST 2008
Allows specifying alternative build script with spaces in name
Signed-off-by: Allan McRae <allan at archlinux.org>
---
scripts/makepkg.sh.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 1dc6415..a999e0b 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1205,9 +1205,9 @@ devel_update() {
if [ "$newpkgver" != "" ]; then
if [ "$newpkgver" != "$pkgver" ]; then
if [ -f "./$BUILDSCRIPT" ]; then
- sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
- sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
- source $BUILDSCRIPT
+ sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "./$BUILDSCRIPT"
+ sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" "./$BUILDSCRIPT"
+ source "$BUILDSCRIPT"
fi
fi
fi
@@ -1496,7 +1496,7 @@ if [ "$CLEANCACHE" = "1" ]; then
fi
fi
-if [ -z $BUILDSCRIPT ]; then
+if [ -z "$BUILDSCRIPT" ]; then
error "$(gettext "BUILDSCRIPT is undefined! Ensure you have updated %s.")" "$MAKEPKG_CONF"
exit 1
fi
@@ -1556,7 +1556,7 @@ if [ ! -f "$BUILDSCRIPT" ]; then
BUILDSCRIPT=/dev/stdin
fi
else
- crlftest=$(file $BUILDSCRIPT | grep -F 'CRLF' || true)
+ crlftest=$(file "$BUILDSCRIPT" | grep -F 'CRLF' || true)
if [ "$crlftest" != "" ]; then
error "$(gettext "%s contains CRLF characters and cannot be sourced.")" "$BUILDSCRIPT"
exit 1
--
1.6.0.6
More information about the pacman-dev
mailing list