mirror of
https://github.com/PDP-10/its.git
synced 2026-03-04 10:44:38 +00:00
So that a space in the name isn't mistaken for the start of the next argument, which is the process ID to kill later.
61 lines
1.0 KiB
Bash
Executable File
61 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#Defaults.
|
|
VT52=${VT52:--B -b 9600}
|
|
|
|
EXIT=:
|
|
trap "" QUIT INT TERM
|
|
|
|
started() {
|
|
EXIT="$EXIT;stop \"$1\" $2"
|
|
trap "$EXIT" EXIT
|
|
echo "$1 started, pid $2"
|
|
}
|
|
|
|
stop() {
|
|
echo -n "Stopping $1... "
|
|
kill "$2" 2> /dev/null
|
|
sleep 2
|
|
kill -9 "$2" 2> /dev/null
|
|
echo "OK"
|
|
}
|
|
|
|
gt40() {
|
|
(sleep 3; tools/simh/BIN/pdp11 build/pdp10-ks/gt40 >gt40.log 2>&1) &
|
|
started GT40 "$!"
|
|
}
|
|
|
|
vt52() {
|
|
(sleep 2; tools/vt05/vt52 $VT52 telnet localhost 10018 >vt52.log 2>&1) &
|
|
started "VT52" "$!"
|
|
}
|
|
|
|
chaosnet() {
|
|
(sleep 2; tools/cbridge/cbridge -c build/cbridge.conf >cbridge.log 2>&1) &
|
|
started "Chaosnet bridge" "$!"
|
|
}
|
|
|
|
help() {
|
|
cat <<EOF
|
|
This start script takes several command line arguments:
|
|
|
|
help - Display this help text.
|
|
gt40 - Start a GT40 emulator.
|
|
vt52 - Start a VT52 emulator.
|
|
chaosnet - Start a local Chaosnet.
|
|
|
|
EOF
|
|
|
|
touch out/pdp10-ks/nohelp
|
|
}
|
|
|
|
test -f out/pdp10-ks/nohelp || help
|
|
|
|
while test -n "$1"; do
|
|
"$1"
|
|
shift
|
|
done
|
|
|
|
tools/sims/BIN/pdp10-ks out/pdp10-ks/run
|
|
exit 0
|