Mercurial > repos > tabletprog
comparison tpc @ 76:c801dccdb4fb
Add shell script for driving tpc.js
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 15 Jul 2012 13:06:29 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
75:2dca1a880c00 | 76:c801dccdb4fb |
---|---|
1 #!/bin/sh | |
2 | |
3 args= | |
4 dir=`dirname $0` | |
5 while [ $# -gt 0 ]; do | |
6 if [ "-o" = "$1" ]; then | |
7 shift | |
8 output="$1" | |
9 else | |
10 args="$args $1" | |
11 fi | |
12 shift | |
13 done | |
14 | |
15 if [ $output ]; then | |
16 if d8 $dir/tpc.js -- $args > $output; then | |
17 exit | |
18 else | |
19 code=$? | |
20 cat $output 1>&2 | |
21 rm -f $output | |
22 exit $code | |
23 fi | |
24 else | |
25 d8 $dir/tpc.js -- $args | |
26 fi | |
27 |