From 78f480f5b65ecf00c79ef4a9fd7ce3ce12b77129 Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 8 May 2012 00:15:24 +0000 Subject: [PATCH] --- MagickWand/script-token.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/MagickWand/script-token.c b/MagickWand/script-token.c index 036a2c30f..fe49c71e3 100644 --- a/MagickWand/script-token.c +++ b/MagickWand/script-token.c @@ -104,7 +104,6 @@ % script 'launcher' to be used for magick scripts. % % #!/bin/sh -% # % : echo "This part is run in the shell, but ignored by Magick" % : exec magick -script "$0" "$@"; exit 10 % # @@ -116,8 +115,8 @@ % DOS script launcher... % % Similarly for DOS, any '@' at the start of the line (outside of quotes) -% will also be treated as comment. To allow the same DOS script launcher -% code +% will also be treated as comment. This allow you to create a DOS script +% launcher, to turn ".bat" DOS scripts into "magick" scripts. % % @echo This line is DOS executed but ignored by Magick % @magick -script %~dpnx0 %* @@ -127,6 +126,15 @@ % -read label:"This is a Magick Script!" % -write show: -exit % +% But this can also be used as a shell script launhers +% +% @() { exec magick -script "$@"; } +% @ "$0" "$@"; exit +% # +% # The rest of the file is magick script +% -read label:"This is a Magick Script!" +% -write show: -exit +% */ /* -- 2.50.1