aboutsummaryrefslogtreecommitdiff
path: root/convert.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-22 14:17:03 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-22 14:17:03 +0200
commitac652bb6fb45099008e862e3ced650299dc3ebb7 (patch)
tree12fb1c902c271fbeac41c4ee416cf1cd76b16fd7 /convert.sh
parent71e104d84b3538e15f27df79b151e6b49cbad1eb (diff)
parente391c4624055138f075c0e5772ccaf8ede094b5a (diff)
downloadnissy-core-ac652bb6fb45099008e862e3ced650299dc3ebb7.tar.gz
nissy-core-ac652bb6fb45099008e862e3ced650299dc3ebb7.zip
Merge branch 'master' into extend_moves
Diffstat (limited to 'convert.sh')
-rwxr-xr-xconvert.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/convert.sh b/convert.sh
new file mode 100755
index 0000000..ba5aa96
--- /dev/null
+++ b/convert.sh
@@ -0,0 +1,22 @@
1#!/bin/sh
2
3for f in $@; do
4 if [ ! -f "$f" ]; then
5 echo "File $f does not exist"
6 exit 1
7 fi
8done
9
10for f in $@; do
11 while read -r line; do
12 #c=$(cat "$f")
13 c="$line"
14 cc="$(./run-old convert -fin H48 -fout B32 -cubestr "$c" 2>/dev/null)"
15 if [ -z "$cc" ]; then
16 echo "$line"
17 else
18 echo "$cc=A"
19 fi
20 done < "$f" > "$f.new"
21 mv "$f.new" "$f"
22done

Generated with cgit - Back to sebastiano.tronto.net