b1536ea1ec
Summary: Bug fix because cd working_dir hasn't been correct. Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot, buda Differential Revision: https://phabricator.memgraph.io/D416
21 lines
450 B
Bash
Executable File
21 lines
450 B
Bash
Executable File
#!/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
|
|
|
|
cd ${working_dir}
|
|
generator="couscous.phar"
|
|
|
|
# download the generator if it's not already downloaded
|
|
if [ ! -f ${generator} ]; then
|
|
curl -OS http://couscous.io/${generator}
|
|
fi
|
|
|
|
# run the preview
|
|
php ${generator} preview
|