aboutsummaryrefslogtreecommitdiff
path: root/utils/genmoveswitch.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-17 19:14:26 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-17 19:14:26 +0100
commitd6fdf14d5c320bdca455f910d58d652c5a7827da (patch)
tree15642a013e719e81526cf02b6656ce22adb8a3cf /utils/genmoveswitch.sh
parenta26ae103faf8fa53b65f7757fb8b4255a37fcd22 (diff)
downloadnissy-core-d6fdf14d5c320bdca455f910d58d652c5a7827da.tar.gz
nissy-core-d6fdf14d5c320bdca455f910d58d652c5a7827da.zip
Simplified move and transform code
Diffstat (limited to 'utils/genmoveswitch.sh')
-rwxr-xr-xutils/genmoveswitch.sh8
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
3printf '\tswitch (m) {\n'
4for 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"
7done
8printf '\t}\n'

Generated with cgit - Back to sebastiano.tronto.net