annotate tpc @ 377:93c28eee141e default tip

Merge
author Michael Pavone <pavone@retrodev.com>
date Sat, 15 Aug 2015 22:45:33 -0700
parents c801dccdb4fb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
76
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 args=
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 dir=`dirname $0`
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 while [ $# -gt 0 ]; do
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 if [ "-o" = "$1" ]; then
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 shift
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 output="$1"
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 else
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 args="$args $1"
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 fi
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 shift
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 done
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 if [ $output ]; then
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 if d8 $dir/tpc.js -- $args > $output; then
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 exit
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 else
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 code=$?
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20 cat $output 1>&2
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21 rm -f $output
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22 exit $code
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23 fi
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24 else
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
25 d8 $dir/tpc.js -- $args
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
26 fi
c801dccdb4fb Add shell script for driving tpc.js
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
27