diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-10-07 09:34:15 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-10-07 16:31:23 +0100 |
commit | 9a13d4aab8954939a75bf26f52761ac4f7a100d0 (patch) | |
tree | b9b4c0771335094de715d53296ad42ae058d2c6b | |
parent | c327ab956418d8217fa02443a90233be906afa78 (diff) |
Fix non-working scripts when CDPATH is set.
If the CDPATH environment variable is set (so cd can look in multiple
places), cd prints out the resulting directory when used. This confuses
a command sequence used in a couple of places doing (cd && pwd) to get
a directory path. Make sure we ignore any output from cd.
-rwxr-xr-x | bin/install_perl_modules | 2 | ||||
-rwxr-xr-x | bin/make_css | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/install_perl_modules b/bin/install_perl_modules index 3e43b5bb7..d757facb6 100755 --- a/bin/install_perl_modules +++ b/bin/install_perl_modules @@ -2,7 +2,7 @@ set -e -DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd | sed -e 's/\/bin$//' )" +DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd | sed -e 's/\/bin$//' )" $DIR/vendor/bin/carton install --deployment --without uk --without zurich --without open311-endpoint diff --git a/bin/make_css b/bin/make_css index 715e0b0e2..87126ef28 100755 --- a/bin/make_css +++ b/bin/make_css @@ -11,14 +11,14 @@ COMPASS=compass SASS=sass -DIR=$(cd "$(dirname "$0")" && pwd -P) -PARENT=$(cd "$DIR"/../.. && pwd) +DIR=$(cd "$(dirname "$0")" >/dev/null && pwd -P) +PARENT=$(cd "$DIR"/../.. >/dev/null && pwd) if [ -f "$PARENT/gem-bin/compass" ]; then COMPASS=$PARENT/gem-bin/compass SASS=$PARENT/gem-bin/sass fi -DIRECTORY=$(cd "$DIR"/../web && pwd) +DIRECTORY=$(cd "$DIR"/../web >/dev/null && pwd) DIRS=${@:-`find -L $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq`} |