From dd96728af8aed2327413456daada2a2f50c217b6 Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Fri, 10 Feb 2017 20:53:02 +0100 Subject: Avoid problems from not using quotes in shell script. --- dist/travis-ci.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/travis-ci.sh b/dist/travis-ci.sh index 6da985787..935f2894b 100755 --- a/dist/travis-ci.sh +++ b/dist/travis-ci.sh @@ -4,9 +4,9 @@ # Stop in case of error set -e -CDIR=$PWD +CDIR=$(pwd) -if [ $# -ne 0 ]; then BLD=$1; fi +if [ $# -ne 0 ]; then BLD="$1"; fi # Display environment echo "Environment:" @@ -15,8 +15,8 @@ env # Prepare prefix="$CDIR/install-$BLD" mkdir "$prefix" -mkdir build-$BLD -cd build-$BLD +mkdir "build-$BLD" +cd "build-$BLD" # Configure case "$BLD" in @@ -52,11 +52,11 @@ PKG_VER=`grep Ghdl_Ver src/version.in | sed -e 's/.*"\(.*\)";/\1/'` if [ "$TRAVIS_TAG" = "" ]; then PKG_TAG=`date -u +%Y%m%d` else - PKG_TAG=$TRAVIS_TAG + PKG_TAG="$TRAVIS_TAG" fi -PKG_FILE=ghdl-$PKG_VER-$BLD-$PKG_TAG.tgz +PKG_FILE="ghdl-$PKG_VER-$BLD-$PKG_TAG.tgz" echo "creating $PKG_FILE" -tar -zcvf $PKG_FILE -C $prefix . +tar -zcvf "$PKG_FILE" -C "$prefix" . # Test export GHDL="$CDIR/install-$BLD/bin/ghdl" -- cgit v1.2.3