forked from gocircuit/escher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# Runs all the Escher tutorials. | ||
# Requires the `escher` command available on the PATH. | ||
|
||
which escher > /dev/null | ||
if [ $? -ne 0 ] | ||
then | ||
>&2 echo "Error: Could not find 'escher' in PATH" | ||
exit 1 | ||
fi | ||
|
||
src_dir="$GOPATH/src/github.com/gocircuit/escher/src/" | ||
tutorial_circuits="ShowIndex HelloWorld Break Debug Exec File TextMerge" | ||
|
||
for circuit in $tutorial_circuits | ||
do | ||
# run each tutorial for at most 2 seconds | ||
echo | ||
echo | ||
echo "################################################################################" | ||
echo "### Running Escher tutorial $circuit ..." | ||
echo "--------------------------------------------------------------------------------" | ||
timeout --foreground --kill-after=2 --signal=SIGINT 3s \ | ||
escher -src "$src_dir" "*tutorial.$circuit" | ||
echo | ||
echo "################################################################################" | ||
done | ||
|