lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac terminal question


From: Jacques Menu Muzhic
Subject: Re: Mac terminal question
Date: Sun, 8 Oct 2017 09:05:53 +0200

Hello Craig,

You can create a script (text) file like this one, make it executable and accessible in your PATH:


###################

address@hidden: ~/bin > cat CompileAllLilyPondFiles 
#!/bin/bash

USAGE="==> Usage: $0 sourceFolder destFolder"

if [ $# -ne 4 ]; then
        echo "$USAGE"
        exit
fi

echo "--> pwd:"
pwd

SOURCE_FOLDER=$1
DEST_FOLDER=$2

if [ 0 == 0 ]; then
        echo "SOURCE_FOLDER  = ${SOURCE_FOLDER}"
        echo "DEST_FOLDER    = ${DEST_FOLDER}"
fi

if [ ! -e ${DEST_FOLDER} ]; then
        mkdir -p ${DEST_FOLDER}
fi

#cd ${SOURCE_FOLDER}
pwd
echo ""

set -x
for FILENAME in $(ls ${SOURCE_FOLDER}/*.ly); do
#       echo "--> FILENAME    = ${FILENAME}:"   
        NEWFILENAME=${FILENAME/${PATTERN}/${ERSATZ}}
        lilypond ${FILENAME} -o ${DEST_FOLDER}/${NEWFILENAME}
        echo ""
        fi
done

ls -sal ${DEST_FOLDER}/*.ly
echo ""

###################

JM

Le 8 oct. 2017 à 03:53, Maxime's Music <address@hidden> a écrit :

Hi Lilyponders,

What do I need to type to get lilypond to engrave all files in a folder (wihout the point-and-click)?

All the best,

Craig


--
Craig Dabelstein
Maxime's Music
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

[Prev in Thread] Current Thread [Next in Thread]