summaryrefslogtreecommitdiff
path: root/CIS/gen-lys
blob: 85c76535e5efc2ea5f7879e72a5ca893fa673c1f (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
37
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