denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] bash help needed


From: Jeremiah Benham
Subject: Re: [Denemo-devel] bash help needed
Date: Sun, 26 Feb 2012 22:59:25 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Does this work they way you want it:

find ./ -name "*.denemo" -exec denemo -n -a "(d-Save)(d-Quit)" '{}' \;

Jeremiah

On 12/27/2011 04:56 AM, Richard Shann wrote:
The latest version in git provides backwards compatibility of trills,
fermata etc with older versions featuring the built-in forms.
This works by converting the older ones to the newer ones when saving
the file (easier to do than on loading).

We will want to drop all the mechanism for supporting these old
built-ins in the release after next (in preparation for the
long-hoped-for 1.0 release?). At the same time we can drop support for
the old style grace support and other out-of-date stuff.

So we need a script that recursively finds .denemo files loads and saves
them.

This can be done using bash commands find and xargs, and someone kindly
suggested a syntax that would work even with files with spaces in the
filename etc. I made a careful note of what the suggestion was, and now
cannot find it :(

After a bit of research I can see that

find testdir/ -name "*.denemo" -print0 | xargs -0  load-and-save

where load-and-save is this bash script:

while [ "$1" != "" ]; do
     denemo -n -a "(d-Save)(d-Quit)" $1
     shift
done

is something like what could be used, but quoting hell intervenes to
prevent this working - in this version the file is not loaded. This also
doesn't work (because the script is not stitched together, but remains
as separate tokens)

denemo -n -a "(d-Open \"" $1 "\")(d-Save)(d-Quit)"

Can someone put me out of my misery? I would like to include a one-liner
if possible with the next release which people can use to upgrade all
their old .denemo files to the latest format, so that we can drop the
old code from the release after that.

Richard



_______________________________________________
Denemo-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/denemo-devel




reply via email to

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