21 lines
484 B
Plaintext
21 lines
484 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
working_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||
|
|
||
|
# curl and php are required
|
||
|
if [ "$( which curl )" == "" ] || [ "$( which php )" == "" ]; then
|
||
|
echo "curl and php are required!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
generator="couscous.phar"
|
||
|
|
||
|
# download the generator if it's not already downloaded
|
||
|
if [ ! -f ${working_dir}/${generator} ]; then
|
||
|
cd ${working_dir}
|
||
|
curl -OS http://couscous.io/${generator}
|
||
|
fi
|
||
|
|
||
|
# run the preview
|
||
|
php ${working_dir}/${generator} preview
|