Skip to content

Commit

Permalink
Fix non-working scripts when CDPATH is set.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dracos committed Oct 7, 2015
1 parent c327ab9 commit 9a13d4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/install_perl_modules
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions bin/make_css
Expand Up @@ -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`}
Expand Down

0 comments on commit 9a13d4a

Please sign in to comment.