Skip to content

Instantly share code, notes, and snippets.

@Hikari9
Created February 14, 2016 23:48
Show Gist options
  • Save Hikari9/5f77bca60c225c8c12cb to your computer and use it in GitHub Desktop.
Save Hikari9/5f77bca60c225c8c12cb to your computer and use it in GitHub Desktop.
Sass watcher
#!/bin/bash
#Runs sass pre-compiler in directory
# Absolute path to this script, e.g. /var/www/pure-celadon/css/sass.sh
SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /var/www/pure-celadon/css
SCRIPTPATH=$(dirname "$SCRIPT")
# The absolute root path, e.g. /var/www/pure-celadon
ROOTPATH=$(dirname "$SCRIPTPATH")
# Run sass to watch style.scss
sass --watch --compass "$SCRIPTPATH/style.scss:$ROOTPATH/style.css"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment