Explorar o código

build: Quote paths in run-scripts

This makes the script more robust, although the source tree is not
really prepared to be built on paths with spaces.
Guillem Jover %!s(int64=10) %!d(string=hai) anos
pai
achega
b0f1071aaf
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      run-script

+ 7 - 7
run-script

@@ -1,19 +1,19 @@
 #!/bin/sh
 
-top_srcdir=`dirname $0`
+top_srcdir="`dirname $0`"
 
 # To avoid using «readlink -f» or «realpath» we just change into the
 # desired directory and work from there.
 cd "$top_srcdir"
-cwd=`pwd`
+cwd="`pwd`"
 cd "$OLDPWD"
 
 # Set up the environment, to use local perl modules and data files.
-export PERL5LIB=$cwd/scripts:$cwd/dselect/methods
-export DPKG_DATADIR=$cwd
+export PERL5LIB="$cwd/scripts:$cwd/dselect/methods"
+export DPKG_DATADIR="$cwd"
 
-interp=$1
-script=$2
+interp="$1"
+script="$2"
 shift 2
 
-exec $interp "$cwd/$script" "$@"
+exec "$interp" "$cwd/$script" "$@"