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

gcc -DDEBUG h48_to_src.c ../src/cube.c -o h48_to_src
gcc -DDEBUG invert.c ../src/cube.c -o invert

for f in transform_??_???.txt; do
	trans="$(echo $f | sed 's/.*_// ; s/\.txt//')"
	printf '[%s] = ' "$trans"
	if [ "$1" = "-i" ]; then
		./invert <"$f" | ./h48_to_src
	else
		./h48_to_src <"$f"
	fi
	printf ',\n'
done

rm -f h48_to_src invert

Generated with cgit - Back to sebastiano.tronto.net