annotate simulate @ 67:ff8d7b4499f5 default tip

Submission prep
author Mike Pavone <pavone@retrodev.com>
date Mon, 16 Jul 2012 04:48:50 -0700
parents d21c31c6b5ef
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 killafter () {
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 sleep $1;
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 /bin/kill -SIGINT $!;
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 }
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 mkfifo .simpipe
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 if [ $# -gt 1 ]; then
67
ff8d7b4499f5 Submission prep
Mike Pavone <pavone@retrodev.com>
parents: 2
diff changeset
10 bin/sim $1 < .simpipe | ./lifter > .simpipe & killafter $2
2
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 else
67
ff8d7b4499f5 Submission prep
Mike Pavone <pavone@retrodev.com>
parents: 2
diff changeset
12 bin/sim $1 < .simpipe | ./lifter > .simpipe
2
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 fi
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 rm .simpipe
d21c31c6b5ef Add dummy files for bin and build. Add simulate script for hooking up simulator and bot.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15