Hi Niek,
On 11/06/15 10:31, Niek de Klein wrote:
Hi all,
I'm trying to write an .eb file for Anacona, which has a binary file
installer. During installation you have to send to the command line:
<Enter>, yes<Enter>, path/to/install/<Enter>. I use easyblock =
'Binary'. The first two steps (pressing enter and saying yes) I can do
by using
install_cmd = 'sh %(name)s-%(version)s.sh | yes'
However, I don't know how to send the install path to the command line
after pressing yes. Is there already support in EasyBuild for sending
text to the command line during installation?
You have a couple of options here (in order of my preference)
i) You can enhance the BInary generic easyblock so you can specify a
string to be passed to stdin of the install command; you can do this via
the 'inp' named argument in the run_cmd function used by the Binary
easyblock
ii) You can write an easyblock that derives from Binary, and uses the
'inp' argument in run_cmd to pass 'yes' and the install dir.
iii) You can write an easyblock that uses run_cmd_qa, to interact with
the interactive installer (see
https://github.com/hpcugent/easybuild-easyblocks/search?utf8=%E2%9C%93&q=run_cmd_qa).
regards,
Kenneth