summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2024-07-19 11:44:42 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2024-07-19 11:44:42 +0200
commitcfb0a6e4100ce03a077cd505fb94736dc91ea8db (patch)
treec24b3ded74e80de4595aba9ce4a16e9a2f4945f5
parentd3e5e8da144a762c77e9db59372a3dfa54d03268 (diff)
downloadMusik-cfb0a6e4100ce03a077cd505fb94736dc91ea8db.tar.xz
improve CIS conversion
-rw-r--r--CIS/Makefile11
-rwxr-xr-xCIS/post-process16
2 files changed, 19 insertions, 8 deletions
diff --git a/CIS/Makefile b/CIS/Makefile
index c8c5ec1..3b9af8b 100644
--- a/CIS/Makefile
+++ b/CIS/Makefile
@@ -1,7 +1,14 @@
+%.musicxml: %.capx
+ mscore "$<" -o "$@"
+
+%.ly: %.musicxml
+ musicxml2ly "$<"
+ ./post-process "$@"
+
%.ly: %.mxl
- musicxml2ly $<
+ musicxml2ly "$<"
./post-process "$@"
%.ly: %.xml
- musicxml2ly $<
+ musicxml2ly "$<"
./post-process "$@"
diff --git a/CIS/post-process b/CIS/post-process
index ffe744b..459a98a 100755
--- a/CIS/post-process
+++ b/CIS/post-process
@@ -10,8 +10,9 @@ sed '
s@\s\+~@~@g;
s@\\bar@| \0@g;
s@\(\S\)\s\+@\1 @g;
-' "$1" \
-| sed '
+' -i "$1"
+
+sed '
/|/! {
:a
N
@@ -21,8 +22,11 @@ sed '
}
/}/! ba
}
-' \
-| sed '
+' -i "$1"
+
+sed '
s@\(\S\)\s\+@\1 @g;
-' \
-| sponge "$1"
+ s@\s$@@
+' -i "$1"
+
+rm "$1~"