diff options
Diffstat (limited to 'utils/genmoveswitch.sh')
| -rwxr-xr-x | utils/genmoveswitch.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/genmoveswitch.sh b/utils/genmoveswitch.sh new file mode 100755 index 0000000..cce18fc --- /dev/null +++ b/utils/genmoveswitch.sh | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | printf '\tswitch (m) {\n' | ||
| 4 | for f in move_??_*.txt; do | ||
| 5 | t="$(echo $f | sed 's/.*_// ; s/\.txt//')" | ||
| 6 | printf '\tcase %s:\n\t\treturn _move(%s, c);\n' "$t" "$t" | ||
| 7 | done | ||
| 8 | printf '\t}\n' | ||
