memgraph/docs/user_technical/run
Marko Budiselic b1536ea1ec Bug fix because cd working_dir hasn't been correct.
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
2017-05-31 16:06:44 +02:00

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