Skip to content

Instantly share code, notes, and snippets.

@jboesch
Created March 20, 2012 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jboesch/2131499 to your computer and use it in GitHub Desktop.
Save jboesch/2131499 to your computer and use it in GitHub Desktop.
Allow multiple compass projects to be "watched"
#!/bin/bash
# This will run compass watchers as background tasks. When you hit CTRL+C, you don't actually
# exit out of them, they're still running. To kill all the watchers, type ./compass kill
# See usage below.
# Usage:
# Put this shell file (compass) in your compass project directory (same directory as config.rb), then navigate to it
# on the command line and type either of the commands below.
# To run, just type ./compass
# To restart, type ./compass restart
# To kill, type ./compass kill
if [ "$1" = "kill" ]; then
for X in `ps acx | grep -i ruby | awk {'print $1'}`; do
kill -9 $X;
done
elif [ "$1" = "restart" ]; then
./compass kill
./compass
elif [ $# = 0 ]; then
echo "Running SCSS on core"
compass w &
echo "Running SCSS on plugins"
cd ../../Plugin/Telus/webroot/scss && compass w &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment