about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoan Tran Cong Danh <congdanhqx@gmail.com>2019-07-10 15:20:53 +0700
committerLeah Neukirchen <leah@vuxu.org>2019-07-14 15:08:21 +0200
commitcecaeccdc633806adfbab5f2d36cebbbfd5ce0c1 (patch)
tree37199be357614d0f448b19180857eea57b6c4d1b
parent9af328f6b9e37effcaf08b52e41cf6c599d57c7e (diff)
downloadxtools-cecaeccdc633806adfbab5f2d36cebbbfd5ce0c1.tar.gz
xtools-cecaeccdc633806adfbab5f2d36cebbbfd5ce0c1.tar.xz
xtools-cecaeccdc633806adfbab5f2d36cebbbfd5ce0c1.zip
xgensum: quote all XBPS_* variable expansion
With 2 previous changes, we probadly don't need this,
just in case someone have spaces in their directory's name.
-rwxr-xr-xxgensum10
1 files changed, 5 insertions, 5 deletions
diff --git a/xgensum b/xgensum
index 2047551..7e447eb 100755
--- a/xgensum
+++ b/xgensum
@@ -29,11 +29,11 @@ fi
 . "$template"
 
 # Try to source the build-style as well. This is required for R-cran packages.
-if [ -f ${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh  ]; then
-	. ${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh
+if [ -f "${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh"  ]; then
+	. "${XBPS_DISTDIR}/common/environment/build-style/${build_style}.sh"
 fi
 
-XBPS_SRCDISTDIR=$($XBPS_DISTDIR/xbps-src show-var XBPS_SRCDISTDIR | tail -1)
+XBPS_SRCDISTDIR=$("$XBPS_DISTDIR/xbps-src" show-var XBPS_SRCDISTDIR | tail -1)
 srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
 
 if [ "$FLAG_f" = -f ]; then
@@ -43,10 +43,10 @@ if [ "$FLAG_f" = -f ]; then
 		distfile="$srcdir/$curfile"
 		rm -vf "$distfile"
 	done
-	$XBPS_DISTDIR/xbps-src -I clean $pkgname
+	"$XBPS_DISTDIR/xbps-src" -I clean $pkgname
 fi
 
-$XBPS_DISTDIR/xbps-src -I fetch $pkgname
+"$XBPS_DISTDIR/xbps-src" -I fetch $pkgname
 
 sums=""
 for f in $distfiles; do