×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Dennis Thompson
Added: Jan 27, 2013 9:33 AM
Modified: Jan 27, 2013 9:34 AM
Views: 21
Tags: no tags
  1. #!/bin/bash
  2.  
  3. # This script will watch a given compass project
  4.  
  5. # http_path=/var/www
  6. # path=/var/www/magento/skin/frontend/default/
  7. # project=your_company
  8.  
  9. echo -n "Enter in a new path and press [ENTER]"
  10.  
  11. while read path; do
  12.      if [ -z "${path}" ]; then
  13.         clear  
  14.                 echo "That was empty, do it again!"
  15.                 echo -n "Enter in a compass project directory and press [ENTER]"
  16.      else
  17.           echo "Checking now..."
  18.           break
  19.      fi
  20. done
  21.  
  22. echo -n "Enter in a project to watch and prss [ENTER]"
  23.  
  24. while read project; do
  25.      if [ -z "${project}" ]; then
  26.         clear  
  27.                 echo "That was empty, do it again!"
  28.                 echo -n "Enter in a compass project name and press [ENTER]"
  29.      else
  30.           echo "Checking now..."
  31.           break
  32.      fi
  33. done
  34.  
  35. echo "Watching" $project "project in directory" $path
  36. echo "To exit project press Command/Control + C"
  37.  
  38. cd $path
  39. compass watch $project
Comments disabled