1
0
Fork 0
mirror of https://github.com/kastdeur/pipeband-music.git synced 2024-12-23 00:33:31 +01:00
pipeband-music/book/load_scores
Eric Teunis de Boone 2cbc0c9bd6 Moved Book scripts around,
few edits to music
2015-12-11 11:25:33 +01:00

34 lines
642 B
Bash

#!/bin/bash
MKDRUM_DIR="../"
MKDRUMCOMMAND=$MKDRUM_DIR"makedrum"
SCORES_DIR="./scores/"
trap "echo Aborted!; exit;" SIGINT SIGTERM
another_dir () {
d=$1
for f in $d/*
do
if [ -d $f ]; then
another_dir $f
continue
fi
if [ ! -f $f ]; then
continue
fi
if [[ ! "$f" == *.ly ]]; then
continue
fi
mkdir -p $SCORES_DIR${d/$MKDRUM_DIR}
#echo $SCORES_DIR${f/$MKDRUM_DIR}
$MKDRUMCOMMAND $f -d $SCORES_DIR${d/$MKDRUM_DIR}
done;
}
for d in ${MKDRUM_DIR}*_marches ${MKDRUM_DIR}strathspeys ${MKDRUM_DIR}standards ${MKDRUM_DIR}jigs ${MKDRUM_DIR}airs ${MKDRUM_DIR}hornpipes ${MKDRUM_DIR}other
do
another_dir $d
done;