-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun.sh
executable file
·38 lines (32 loc) · 923 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh -e
usage() {
echo 'Usage: <command> [...]
Commands:
WhitespaceProgramRunner -- Interpreter
ListingFileProgramRunner -- Interpreter for listing files
WhitespaceCompilerDebugger -- Assembler
CreateSimpleOutputFromString -- Text to Whitespace converter' >&2
exit 2
}
if [ $# = 0 ]; then
usage
fi
command="$1"
shift
case "$command" in
WhitespaceProgramRunner)
exec java -cp whitespacesdk.jar uk.co.mash.whitespace.executable.WhitespaceProgramRunner "$@"
;;
ListingFileProgramRunner)
exec java -cp whitespacesdk.jar uk.co.mash.whitespace.executable.ListingFileProgramRunner "$@"
;;
WhitespaceCompilerDebugger)
exec java -cp whitespacesdk.jar uk.co.mash.whitespace.executable.WhitespaceCompilerDebugger "$@"
;;
CreateSimpleOutputFromString)
exec java -cp whitespacesdk.jar uk.co.mash.whitespace.executable.CreateSimpleOutputFromString "$@"
;;
*)
usage
;;
esac