# HG changeset patch # User Mike Pavone # Date 1342382789 25200 # Node ID c801dccdb4fb0aa20bda2ce6230ddd697fbda76d # Parent 2dca1a880c0030153d52d6b1c10201ebecb6aa20 Add shell script for driving tpc.js diff -r 2dca1a880c00 -r c801dccdb4fb tpc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tpc Sun Jul 15 13:06:29 2012 -0700 @@ -0,0 +1,27 @@ +#!/bin/sh + +args= +dir=`dirname $0` +while [ $# -gt 0 ]; do + if [ "-o" = "$1" ]; then + shift + output="$1" + else + args="$args $1" + fi + shift +done + +if [ $output ]; then + if d8 $dir/tpc.js -- $args > $output; then + exit + else + code=$? + cat $output 1>&2 + rm -f $output + exit $code + fi +else + d8 $dir/tpc.js -- $args +fi +