makeHornInF.sh
changeset 749 06fec6764661
parent 748 ce5c7214f9aa
child 876 1a838d8dca2a
--- a/makeHornInF.sh	Fri Oct 13 15:44:15 2017 +0100
+++ b/makeHornInF.sh	Fri Oct 13 15:56:23 2017 +0100
@@ -18,17 +18,25 @@
 booke=$dir/$1
 outdir=$dir/$1-HornInF
 
-mkdir -p $outdir
+mkdir -p $outdir/Compact
 
 # Copy book component items.
 cp $booke/*.txt $outdir
 
 echo "Horn in F" > $outdir/instrument.txt
 
-find $booke -depth 1 -name "*.abc" | sort |
+find $booke -name "*.abc" | sort |
     while read filename
     do
         name=`basename $filename .abc`
+
+        dir=`dirname $filename`
+        basedir=`basename $dir`
+        compact=""
+        if [ "$basedir" = "Compact" ]; then
+            compact="Compact/"
+        fi
+
         range=`./abcrange.py $filename`
 
         # Transpose concert pitch up a fifth.
@@ -50,6 +58,6 @@
         # note will otherwise appear in bass clef, which is not what this
         # crap horn player wants.
         abc2abc $outdir/$name.abc.tmp -e -t $transpose | \
-            sed -e "/^ *K:/s/$/ clef=treble/" > $outdir/$name.abc
+            sed -e "/^ *K:/s/$/ clef=treble/" > $outdir/$compact$name.abc
         rm $outdir/$name.abc.tmp
     done