How to handle companion programs?

Auteur Réponses
Gustra Jeudi 14 Avril 2011 à 13:38

I'm working on a Gamer's Gate game installer bash script, and it's currently working quite fine. But the script has a companion program which handles all direct contact with the Gamer's Gate web site, written in perl since I am not fluent in python. I know next to nothing about POL plugins and such.

I have tried keeping the program inside the bash script and pipe it through perl during runtime, but it appears that python is somehow working behind the scenes and chokes on the code.

This is basically how I've tried to pipe the program to perl:

cat<<EOF | perl -
<perl script here>

I've also tried:

cat<<EOF | sed -e 's/^#//' | perl -
# <commented perl script here>

but python still wants to process the perl code. The following is shown in a dialog box:

Can't load image from file 'syntax error at - line 22, near "if ->content "': file does not exist.
Since I've hit the brick wall, my question is how companion programs should be handled?

Should it be handled via a .pol (plugin I assume?), or should the installer download the program from the POL site during installation? Or is there some other way to handle these?

Edité par Gustra

petch Jeudi 5 Janvier 2012 à 9:43

If you put quotes around heredoc tag, the heredoc will be processed in a similar way as strings enclosed with the same kind of quotes; So I'd suggest trying
perl << 'eof'
perl script here

If you want to prevent any kind of interpretation.
See "Here Documents" section in bash man page.

Edité par petch