Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gimp script that does not work within shell script
#1
Hi folks!

I have a silly problem with gimp and linux bash.
I have a very simple gimp script that work well when called from a interactive shell.
I have a shell script that call the gimp script, so I have not typing all the gimp invocation.
The shell script call the gimp script: but gimp never exit and does not create files.
The same problem when I used "source" to execute the bash script directly in the interactive shell.
Have anyone a similar problem??

I send attached the two scripts and the output of the two forms of calling the gimp script, directly or with the bash script.

There are two differences: the message "batch command executed successfully" is show one or two times, and in the first case all work well and newfiles are generated, in the second I have to interrupt gimp (Ctrl-C) and no file is generated.

Any insight?
Thanks!
MVE

Gimp GNU versión 2.8.18
Linux 4.9.0-19-686-pae #1 SMP Debian 4.9.320-2 (2022-06-30) i686 GNU/Linux


Attached Files
.txt   forum.txt (Size: 1.3 KB / Downloads: 94)
Reply
#2
I attach again forum.txt, because the first version is incomplete...
.txt   forum.txt (Size: 1.65 KB / Downloads: 59)

Bug fixed!
Using de shell invocation into a makefile, I realized that I had a lot of quotes...
In short:
* from the command line:
$    gimp --as-new -dfs -i -b '(img2img "ATSP-A0min.png" "prueba.eps")' -b '(gimp-quit 1)'
* from a Makefile:
%.eps: %.png
    gimp --as-new -dfs -i -b '(img2img "$<" "$@")' -b '(gimp-quit 0)'

* from a shell script:
    gimp --as-new -dfs -i -b '(img2img "'$1'" "'$2'")' -b '(gimp-quit 0)'

So this issue has to do with bash, not with gimp...

That's all, folks!
Reply


Forum Jump: