aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build-all.sh
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2011-11-29 08:59:56 +0000
committerNIIBE Yutaka <[email protected]>2011-11-29 08:59:56 +0000
commit751d452116607eb5ddcbea970b6f24c7a427620e (patch)
tree2d33f8301b89dc4f21b3e9aaf17b9be83e5d2c29 /scripts/build-all.sh
parentPC/SC pinpad support (pinpad input for modify pass phrase with resetcode, by ... (diff)
parentMake sure HOME et al have no unsafe characters. (diff)
downloadgnupg-751d452116607eb5ddcbea970b6f24c7a427620e.tar.gz
gnupg-751d452116607eb5ddcbea970b6f24c7a427620e.zip
Merge branch 'master' of git+ssh://playfair.gnupg.org/git/gnupg
Diffstat (limited to 'scripts/build-all.sh')
-rwxr-xr-xscripts/build-all.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/build-all.sh b/scripts/build-all.sh
index 3cd4f303c..23af6203d 100755
--- a/scripts/build-all.sh
+++ b/scripts/build-all.sh
@@ -17,6 +17,23 @@
p=$HOME/tmp/gpg-tmp
parts="libgpg-error libassuan libksba libgcrypt gnupg"
die=no
+here="`pwd`"
+
+# Reject unsafe characters in $PWD and $HOME. We consider spaces as
+# unsafe because it is too easy to get scripts wrong in this regard.
+am_lf='
+'
+case $here in
+ *[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ echo "unsafe working directory: \`$here'"; die=yes;;
+esac
+case $HOME in
+ *[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ echo "unsafe home directory: \`$HOME'"; die=yes;;
+esac
+test $die = yes && exit 1
+
+# Check that all components are available
for i in $parts; do
if test -d $i ; then
:
@@ -35,7 +52,6 @@ done
export PATH=$p/bin:$PATH
export LD_LIBRARY_PATH=$p/lib
-here="$(pwd)"
prev=
cfg="configure --enable-maintainer-mode --prefix=$p"