aboutsummaryrefslogtreecommitdiff
path: root/convert.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-22 11:14:06 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-22 11:14:06 +0200
commitcd866d68cf1bf6ea928cc48a4f2b753c0b1baa6f (patch)
treef50ad0087e90e301240b6c93dcd267cbe49b282d /convert.sh
parent8b72e391c7185e3da0dfbf0ab60068ac37e4d5cc (diff)
downloadnissy-core-cd866d68cf1bf6ea928cc48a4f2b753c0b1baa6f.tar.gz
nissy-core-cd866d68cf1bf6ea928cc48a4f2b753c0b1baa6f.zip
Updated tests and added fixed =A to B32 output
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