diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-17 19:14:26 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-17 19:14:26 +0100 |
| commit | d6fdf14d5c320bdca455f910d58d652c5a7827da (patch) | |
| tree | 15642a013e719e81526cf02b6656ce22adb8a3cf /utils/genmoveswitch.sh | |
| parent | a26ae103faf8fa53b65f7757fb8b4255a37fcd22 (diff) | |
| download | nissy-core-d6fdf14d5c320bdca455f910d58d652c5a7827da.tar.gz nissy-core-d6fdf14d5c320bdca455f910d58d652c5a7827da.zip | |
Simplified move and transform code
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' | ||
