Created
October 13, 2012 07:46
-
-
Save Velrok/3883725 to your computer and use it in GitHub Desktop.
A little bash script to start a coffe watch compile.
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 | |
help="usage: coffee-mashine coffe-source-dir compile-dir" | |
if [ ! $1 ] | |
then | |
echo "coffe-source-dir is missing" | |
echo $help | |
exit 1 | |
fi | |
if [ ! -r $1 ] | |
then | |
echo "coffe-source-dir invalid. Has to be readable." | |
echo $help | |
exit 1 | |
fi | |
if [ ! $2 ] | |
then | |
echo "compile-dir is missing" | |
echo $help | |
exit 1 | |
fi | |
if [ ! -d $2 ] | |
then | |
echo "compile dir invalid. Has to be a directory." | |
echo $help | |
exit 1 | |
fi | |
coffee -c -w -o "$2" "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment