I am trying to automate my ubuntu setup with a bash script and got the following problem:
I want the script to automatically send a enter keystroke, when running umake ide eclipse
(this installs eclipse ide from the terminal).
This is the standard output, when running from the terminal without a script:
$ umake ide eclipse
Choose installation path: /home/gn4i/.local/share/umake/ide/eclipse
<need to press enter>
Downloading and installing requirements
Normally I would do this with echo | umake ide eclipse
, but I always get the following error
$ echo | umake ide eclipse
Choose installation path: Choose installation path: ERROR: Unhandled exception
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper
function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/umake/ui/__init__.py", line 42, in display
cls.currentUI._display(contentType)
File "/usr/lib/python3/dist-packages/umake/ui/cli/__init__.py", line 61, in _display
contentType.run_callback(result=rlinput(contentType.content, contentType.default_input))
File "/usr/lib/python3/dist-packages/umake/ui/cli/__init__.py", line 41, in rlinput
return input(prompt + " ")
EOFError: EOF when reading a line
How can I automate this installation?
{echo ; sleep 5 ; } | umake ide eclipse
? The error message is complaining about EOF so we keep the pipe open for another 5 seconds. Just a guess. – icarus Jan 20 at 16:42screen -d -m -S umake-eclipse
screen -S umake-eclipse -p 0 -X stuff "umake ide eclipse\n\n"
– uloco Jan 20 at 17:03bash: syntax error near unexpected token
}'` It also does not work, when I replace the curly braces with round braces. – uloco Jan 20 at 17:09