summaryrefslogtreecommitdiff
path: root/CIS/gen-lys
blob: 23f20604e85c2f6d87c1ef61884c207b2798de60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

cd "$(dirname "$(readlink -e "$0")")"

masterMakefile=$(
  ls -l ../*/Makefile \
  | sort -k2n,2 \
  | tail -n1 \
  | sed 's@^.* @@'
)

for s in *.cap *.capx *.xml *.mxl; do
  s="${s%.*}.ly"
  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
  timeout 10 make "$s" || continue
  mkdir "$d"
  mv "$s" "$d/${d#*/}.ly"
  ln "${masterMakefile}" "$d"
  git add "$d"
  git commit "$d" -m "${d#*/} neu"
done