diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-06-03 16:19:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-06-03 16:19:00 +0100 |
commit | b730faa71f5160f204ce09b1039ee3d036f76772 (patch) | |
tree | 9314b11b995ad6d9b1343ae10d3129e84874c97c | |
parent | a073247d41b2528d567d3149ea5b2ceb8f76bab7 (diff) | |
parent | dcdb7d76347799141225cb453d15501c370c1568 (diff) |
Merge branch '422-bashrc-gem-fix'
-rwxr-xr-x | bin/install-as-user | 10 | ||||
-rwxr-xr-x | bin/make_css | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/bin/install-as-user b/bin/install-as-user index b9dfa3973..1d6cce982 100755 --- a/bin/install-as-user +++ b/bin/install-as-user @@ -67,6 +67,16 @@ mkdir -p "$GEM_HOME" export GEM_PATH= export PATH="$GEM_HOME/bin:$PATH" +if ! grep -q 'Set up local gem directory for FixMyStreet' $HOME/.bashrc; then + cat >>$HOME/.bashrc <<EOBRC + +# Set up local gem directory for FixMyStreet +export GEM_HOME="$DIRECTORY/gems" +export GEM_PATH= +export PATH="\$GEM_HOME/bin:\$PATH" +EOBRC +fi + gem install --no-ri --no-rdoc compass # Use compass to generate the CSS, if it doesn't seem to already 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 |