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 /bin/make_css | |
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.
Diffstat (limited to 'bin/make_css')
-rwxr-xr-x | bin/make_css | 6 |
1 files changed, 3 insertions, 3 deletions
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`} |