Edit:
Replace file=%%p
by:
file=$(basename %%p)
Otherwise there might be problems with paths containing white spaces.
Le samedi 13 juillet 2013 à 23:44, Steve Burgondy a écrit :
> Hello,
>
> It is possible to run shell commands directly from Fraise, instead of typing
> them in a Terminal.
>
> For this, go to the Tools Menu and create a new command.
> Add the following code (for example):
>
>
> #!/bin/sh
>
> # Set directory
> cd %%d
>
> # Run Lilypond
> /Applications/LilyPond.app/Contents/Resources/bin/lilypond %%p
>
> # Open the pdf in viewer
> file=%%p
> pdf=${file%%.ly}.pdf
> open $pdf
>
>
>
>
>
> Remarks:
> - In Fraise, %%d is the directory and %%p is the full path to your file
> - The "pdf=${file%%.ly}.pdf" line takes off the ".ly" extension and replaces
> it by ".pdf"
> - In the window, do not check the "Inline" checkbox.
> - You can now run the command from the Tools Menu. You can also set a
> keyboard shortcut for this command if you like.
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user