aboutsummaryrefslogtreecommitdiff
path: root/utils/gentransswitch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/gentransswitch.sh')
-rwxr-xr-xutils/gentransswitch.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/gentransswitch.sh b/utils/gentransswitch.sh
index a08dff9..42726ce 100755
--- a/utils/gentransswitch.sh
+++ b/utils/gentransswitch.sh
@@ -3,6 +3,12 @@
3printf '\tswitch (t) {\n' 3printf '\tswitch (t) {\n'
4for f in transform_??_???.txt; do 4for f in transform_??_???.txt; do
5 t="$(echo $f | sed 's/.*_// ; s/\.txt//')" 5 t="$(echo $f | sed 's/.*_// ; s/\.txt//')"
6 printf '\tcase %s:\n\t\treturn _trans_%s(c);\n' "$t" "$t" 6 mirror_or_rotation="$(echo $t | grep m)"
7 if [ -z "$mirror_or_rotation" ]; then
8 m="rotation"
9 else
10 m="mirrored"
11 fi
12 printf '\tcase %s:\n\t\treturn _trans_%s(%s, c);\n' "$t" "$m" "$t"
7done 13done
8printf '\t}\n' 14printf '\t}\n'

Generated with cgit - Back to sebastiano.tronto.net