Skip to content

Instantly share code, notes, and snippets.

@Velrok
Created October 13, 2012 07:46
Show Gist options
  • Save Velrok/3883725 to your computer and use it in GitHub Desktop.
Save Velrok/3883725 to your computer and use it in GitHub Desktop.
A little bash script to start a coffe watch compile.
#!/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