diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:16:58 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:16:58 +0200 |
| commit | 989e933fc557cbc1e9e16e45033387816ee6075e (patch) | |
| tree | 867ee23bdaf6ba1e0e5f001d1a15e3bb46fa3bc3 /utils/gentranscode.sh | |
| parent | 2a8d66906dde19ffb7315fb3f60a396a71612037 (diff) | |
| download | nissy-core-989e933fc557cbc1e9e16e45033387816ee6075e.tar.gz nissy-core-989e933fc557cbc1e9e16e45033387816ee6075e.zip | |
Improved transformations and cleaned up
Diffstat (limited to 'utils/gentranscode.sh')
| -rwxr-xr-x | utils/gentranscode.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh index abc3480..f820d7c 100755 --- a/utils/gentranscode.sh +++ b/utils/gentranscode.sh | |||
| @@ -1,12 +1,17 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | gcc -DDEBUG h48_to_src.c ../src/cube.c | 3 | gcc -DDEBUG h48_to_src.c ../src/cube.c -o h48_to_src |
| 4 | gcc -DDEBUG invert.c ../src/cube.c -o invert | ||
| 4 | 5 | ||
| 5 | for f in transform_??_???.txt; do | 6 | for f in transform_??_???.txt; do |
| 6 | trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" | 7 | trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" |
| 7 | printf '[%s] = ' "$trans" | 8 | printf '[%s] = ' "$trans" |
| 8 | ./a.out <"$f" | 9 | if [ "$1" = "-i" ]; then |
| 10 | ./invert <"$f" | ./h48_to_src | ||
| 11 | else | ||
| 12 | ./h48_to_src <"$f" | ||
| 13 | fi | ||
| 9 | printf ',\n' | 14 | printf ',\n' |
| 10 | done | 15 | done |
| 11 | 16 | ||
| 12 | rm a.out | 17 | rm -f h48_to_src invert |
