aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-01-15 16:13:23 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-01-19 16:35:37 +0000
commitf1f9e7fae8df97def1c91f1e5b620ec6ffc1a736 (patch)
treed4e434f4ca7d41b6d55c895709bc11b574c9816b /bin
parent8e6d48d5ee351594fc92f1e680ba4a2219ed57ca (diff)
Better finding of parent directory when in symlink
Fixes #978.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_css5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/make_css b/bin/make_css
index a8afafb27..3a1fca1a7 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -11,13 +11,14 @@
COMPASS=compass
SASS=sass
-PARENT=$(cd `dirname $0`/../.. && pwd)
+DIR=$(cd "$(dirname "$0")" && pwd -P)
+PARENT=$(cd "$DIR"/../.. && pwd)
if [ -f "$PARENT/gem-bin/compass" ]; then
COMPASS=$PARENT/gem-bin/compass
SASS=$PARENT/gem-bin/sass
fi
-DIRECTORY=$(cd `dirname $0`/../web && pwd)
+DIRECTORY=$(cd "$DIR"/../web && pwd)
DIRS=${@:-`find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq`}