Re: [Gimp-user] Problem running script-fu in bash script

2004-06-09 Thread Sven Neumann
Hi,

Mathieu Masse [EMAIL PROTECTED] writes:

 Now when I call this from a bash script it is also fine, my
 problem is that instead of passing fixed parameters to my script-fu
 script I want to pass bash variables, but I can't get this to work,
 I looked on the web and tried what people suggest but can't get it
 to work, please help.

I'd say your quoting is wrong. You can hardly expect nested single
ticks to work.

 gimp -d -i --verbose -b '(script-fu-add-text-weather-map '$fullpath'
 '$file' '$current_time')'

Try this instead:

gimp -d -i --verbose -b '(script-fu-add-text-weather-map $fullpath
$file $current_time)'


Sven
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Problem running script-fu in bash script

2004-06-09 Thread Simon Budig
Sven Neumann ([EMAIL PROTECTED]) wrote:
 I'd say your quoting is wrong. You can hardly expect nested single
 ticks to work.
 
  gimp -d -i --verbose -b '(script-fu-add-text-weather-map '$fullpath'
  '$file' '$current_time')'
 
 Try this instead:
 
 gimp -d -i --verbose -b '(script-fu-add-text-weather-map $fullpath
 $file $current_time)'

Single ticks in this case prevent the variables to be expanded.

Try this instead:

gimp -d -i --verbose -b (script-fu-add-text-weather-map \$fullpath\
\$file\ \$current_time\)

Bye,
Simon
-- 
  [EMAIL PROTECTED]  http://simon.budig.de/
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Problem running script-fu in bash script

2004-06-09 Thread Mathieu Masse
On Wed, 2004-06-09 at 06:58, Sven Neumann wrote:
 Hi,
 
 Mathieu Masse [EMAIL PROTECTED] writes:
 
  Now when I call this from a bash script it is also fine, my
  problem is that instead of passing fixed parameters to my script-fu
  script I want to pass bash variables, but I can't get this to work,
  I looked on the web and tried what people suggest but can't get it
  to work, please help.
 
 I'd say your quoting is wrong. You can hardly expect nested single
 ticks to work.
 
  gimp -d -i --verbose -b '(script-fu-add-text-weather-map '$fullpath'
  '$file' '$current_time')'
 
 Try this instead:
 
 gimp -d -i --verbose -b '(script-fu-add-text-weather-map $fullpath
 $file $current_time)'
 
That also does not work using the double quotes gimp thinks these are
strings and does not evaluate the values of the variables...

 Sven

--
Mathieu Mass

Email: [EMAIL PROTECTED]

GPG Public Key available at http://www.keyserver.net
Key fingerprint = 9C3F 7217 1AF5 0BC6 B502 79B3 B1BB 7360 D043 B69C


signature.asc
Description: This is a digitally signed message part


[Gimp-user] Problem running script-fu in bash script

2004-06-08 Thread Mathieu Masse
Hi list,

This is my first posting to the list, I've run into a small problem
while writing a script to simplify some task. My script does the
following: opens up a .jpg file, crops it, adds text to it, flattens the
layers, and saves everything back. All this runs fine in Gimp (ie. from
the Xtra menu and script-fu)

Now when I call this from a bash script it is also fine, my problem
is that instead of passing fixed parameters to my script-fu script I
want to pass bash variables, but I can't get this to work, I looked on
the web and tried what people suggest but can't get it to work, please
help.

Here is some info on everything:
Red Hat 9.0
Gimp-1.2.3-16 (from Red Hat's rpm)

Here is my bash script:

*
#!/bin/sh
   
 
file=temp.jpg
fullpath=/home/mathieu/miscellaneous/backgrounds/weather_maps/temp.jpg
current_time=13:25
   
 
gimp -d -i --verbose -b '(script-fu-add-text-weather-map '$fullpath'
'$file' '$current_time')'
*

Has you can see my gimp script as 3 parameters, which I want to pass
as variables (fullpath, file, current_time).

TIA for the help

Mathieu

--
Mathieu Mass

Email: [EMAIL PROTECTED]

GPG Public Key available at http://www.keyserver.net
Key fingerprint = 9C3F 7217 1AF5 0BC6 B502 79B3 B1BB 7360 D043 B69C


signature.asc
Description: This is a digitally signed message part