#!/usr/bin/env bash script="${BASH_SOURCE%/*}/../script/grapht.coffee" phantom_version=`phantomjs -v` if [ $? -ne 0 ]; then echo "could not find phantomjs!" exit 1 fi if [ "$#" -ge 1 ]; then phantomjs $script $@ < /dev/stdin else echo "ERROR:" echo "-- grapht was called with unknown arguments:" echo "-- grapht requires an initial argument, specifying the graph type." exit 1 fi