aboutsummaryrefslogtreecommitdiff
path: root/utils/genmovecode.sh
blob: d6440e5172cca9fe77a09689e56ce8111e8dde21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

gcc -DDEBUG h48_to_lst.c ../cube.c -o h48_to_lst

gen() {
	for f in move_??_*.txt; do
		move="$(echo $f | sed 's/.*_// ; s/\.txt//')"
		printf '#define _move_cube_%s fastcube( \\\n    ' "$move"
		./h48_to_lst <"$f"
		printf ')\n'
	done
}

gen
rm -f h48_to_lst invert

Generated with cgit - Back to sebastiano.tronto.net