I need to install anaconda in the /opt and have to use sudo to do so. I also need to make anaconda install part of a bigger install script but Anaconda install script cause exit to my global install and somehow I land in as a root.
myscript.sh is
...
chmod 777 ./
Anaconda-2.1.0-Linux-x86_64.sh./
Anaconda-2.1.0-Linux-x86_64.sh -b -p /usr/share/anaconda
echo done
conda update conda
..
and I call
ubuntu@mynode:/tmp$ sudo ./myscript.sh
and the result becomes
...
installing: anaconda-2.1.0-np19py27_0 ...
installing: _cache-0.0-x0 ...
Python 2.7.8 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
root@mynode:/tmp#
so the line "echo done" never executes.
Please help. How do I fix this? I tried background job but that do not work either.