diff makeCello.sh @ 749:06fec6764661

Revise transposition scripts to make Compact.
author Jim Hague <jim.hague@acm.org>
date Fri, 13 Oct 2017 15:56:23 +0100
parents ce5c7214f9aa
children 1a838d8dca2a
line wrap: on
line diff
--- a/makeCello.sh	Fri Oct 13 15:44:15 2017 +0100
+++ b/makeCello.sh	Fri Oct 13 15:56:23 2017 +0100
@@ -46,17 +46,25 @@
 booke=$dir/$1
 outdir=$dir/$1-Cello
 
-mkdir -p $outdir
+mkdir -p $outdir/Compact
 
 # Copy book component items.
 cp $booke/*.txt $outdir
 
 echo "Cello" > $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`
 
         # Move down either one octave or two, depending on the range
@@ -66,5 +74,5 @@
             middle="d"
         fi
 
-        sed -e "/^ *K:/s/$/ clef=bass middle=$middle/" $filename > $outdir/$name.abc
+        sed -e "/^ *K:/s/$/ clef=bass middle=$middle/" $filename > $outdir/$compact$name.abc
     done