Created
July 4, 2011 18:51
-
-
Save issackelly/1063769 to your computer and use it in GitHub Desktop.
Compass and CoffeeScript in Virtualenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# postactivate | |
# This hook is run after this virtualenv is activated. | |
cd ~/Projects/internal_kct/reb/ | |
if [ "${OLDPATH}" == "" ]; then | |
echo "SETTING PATH" | |
export OLDPATH=$PATH | |
export PATH=$PATH:~/Projects/internal_kct/reb/bin/ | |
fi | |
watch_coffee_sass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# predeactivate | |
# This hook is run before this virtualenv is deactivated. | |
if [ "${OLDPATH}" != "" ]; then | |
echo "Resetting PATH" | |
export PATH=$OLDPATH | |
unset OLDPATH | |
fi | |
cd ~/Projects/internal_kct/reb | |
WATCHING=`cat logs/watching.pid` | |
if [ "${$}" == "${WATCHING}" ]; then | |
echo "KILLING coffee/sass" | |
kill `cat logs/coffee.pid` | |
kill `cat logs/compass.pid` | |
echo "" > logs/watching.pid | |
fi | |
unset WATCHING |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# watch_coffee_sass | |
cd ~/Projects/internal_kct/reb/ | |
WORKING=`cat logs/watching.pid` | |
if [ "${WORKING}" == "" ]; then | |
echo "LAUNCHING WATCHERS" | |
echo $$ > logs/watching.pid | |
coffee -o reb_project/static/js/ -w reb_project/static/coffee/ >> logs/coffee.log & | |
PID=$! | |
echo $PID > logs/coffee.pid | |
compass watch reb_project/static >> logs/compass.log & | |
PID=$! | |
echo $PID > logs/compass.pid | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment