Re: [easybuild] Sending text to the command line during installation
Thanks Ward and Kenneth, enough options to use Niek On Thu, Jun 11, 2015 at 10:39 AM, Kenneth Hoste wrote: > 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: >> , yes, path/to/install/. 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 >
Re: [easybuild] Sending text to the command line during installation
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: , yes, path/to/install/. 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
Re: [easybuild] Sending text to the command line during installation
Hi Niek, We have support for installing software through a question/answer system. But you will need a custom easyblock for it. For example, take a look at the Mathematica easyblock: https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/m/mathematica.py The install path can be access by `%(installdir)s` variable in an easyconfig. Ward On Thu, Jun 11, 2015 at 10:31 AM, 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: > , yes, path/to/install/. 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? > > Thanks, > Niek -- ir. Ward Poelmans Center for Molecular Modeling Ghent University Technologiepark 903, B-9052 Zwijnaarde Belgium Tel: +32 9 264 65 76 E-mail: ward.poelm...@ugent.be http://molmod.UGent.be/
[easybuild] Sending text to the command line during installation
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: , yes, path/to/install/. 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? Thanks, Niek