On 08/09/14 09:16, Pierre Labastie wrote:


Second, even if a version were added to the title, since the installation
process is interactive, installation cannot be automated anyway.


I'm not volunteering, but it's reasonably straightforward to automate interactive installs with 'expect', for example, this is a script which I wrote for a binary install of the Free Pascal compiler (with unquoted EOF so I can substitute $install_dir):

    cat > expect.$$$ << EOF
set timeout -1   ;
spawn bash install.sh
expect {
    "Install prefix" { exp_send "$install_dir\r" ; exp_continue }
    "Install Textmode IDE" { exp_send "y\r" ; exp_continue }
    "Install FCL" { exp_send "y\r" ; exp_continue }
    "Install packages" { exp_send "y\r" ; exp_continue }
    "Install documentation" { exp_send "y\r" ; exp_continue }
    "Install demos" { exp_send "y\r" ; exp_continue }
    "Install demos in" { exp_send "\r" ; exp_continue }
    eof
}
EOF

and to run it is simply:

    expect expect.$$$

or alternatively you can do it all on the expect command line, e.g. for the Android SDK (not the latest version):

    expect -c '
set timeout -1   ;
spawn tools/android update sdk --no-ui --no-https \
--filter platform-tools,build-tools-19.0.1,android-19,extra-android-support;
expect {
    "Do you accept the license" { exp_send "y\r" ; exp_continue }
    eof
}
'

(Without missing the final single quote)

David
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to