aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-05-24 16:22:11 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-06-03 16:00:55 +0100
commitdcdb7d76347799141225cb453d15501c370c1568 (patch)
treecd363bbf0d69ce5198c5984657679fcca5a397f2
parent11948df37d6d49be4a2b635d39a63e55e2e97427 (diff)
More automated way of spotting compass-using sites.
-rwxr-xr-xbin/make_css8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/make_css b/bin/make_css
index cd78e7f13..80fcb462f 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -14,10 +14,10 @@
DIRECTORY=$(cd `dirname $0`/../web && pwd)
# FixMyStreet uses compass
-NEWSTYLE=${1:-"fixmystreet bromley fixmybarangay barnet zurich default stevenage oxfordshire"}
-NEWSTYLE_REGEX=${NEWSTYLE// /\\|}
+NEWSTYLE=${1:-`find $DIRECTORY -name "config.rb" -exec dirname {} \;`}
+NEWSTYLE_REGEX=$(sed 's/ /\\|/g' <<< $NEWSTYLE)
for site in $NEWSTYLE; do
- compass compile --output-style compressed $DIRECTORY/cobrands/$site
+ compass compile --output-style compressed $site
done
# If given a command line argument, assume was a compass directory and exit
@@ -26,7 +26,7 @@ if [ -n "$1" ]; then
fi
# The rest are plain sass
-for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\($NEWSTYLE_REGEX\)"`
+for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "\($NEWSTYLE_REGEX\)"`
do
sass --scss --update --style compressed $scss
done