annotate simulate @ 56:ca86c88c2336

merge
author William Morgan <bill@mrgn.org>
date Sun, 15 Jul 2012 22:24:35 -0700
parents d21c31c6b5ef
children ff8d7b4499f5
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
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
10 bin/sim $1 < .simpipe | bin/lifter > .simpipe & killafter $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
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
12 bin/sim $1 < .simpipe | bin/lifter > .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
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