summaryrefslogtreecommitdiff
path: root/CIS/gen-lys
diff options
context:
space:
mode:
Diffstat (limited to 'CIS/gen-lys')
-rwxr-xr-xCIS/gen-lys38
1 files changed, 38 insertions, 0 deletions
diff --git a/CIS/gen-lys b/CIS/gen-lys
new file mode 100755
index 0000000..85c7653
--- /dev/null
+++ b/CIS/gen-lys
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+cd "$(dirname "$(readlink -e "$0")")"
+
+for s in *.cap *.capx *.xml *.mxl; do
+ timeout 10 make "${s%.*}.ly"
+done
+
+masterMakefile=$(
+ ls -l ../*/Makefile \
+ | sort -k2n,2 \
+ | tail -n1 \
+ | sed 's@^.* @@'
+)
+
+for s in *.ly; do
+ d="../$(
+ echo "$s" \
+ | sed '
+ s@^.*/@@
+ s@\.ly$@@
+ s@ @_@g
+ s@ä@ae@g
+ s@ö@oe@g
+ s@ü@ue@g
+ s@Ä@Ae@g
+ s@Ö@Oe@g
+ s@Ü@Ue@g
+ s@ß@sz@g
+ '
+ )"
+ [ -d "$d" ] && continue
+ mkdir "$d"
+ mv "$s" "$d"
+ ln "${masterMakefile}" "$d"
+ git add "$d"
+ git commit "$d" -m "${d#*/} neu"
+done