LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   creating an auto install script (https://www.linuxquestions.org/questions/linux-general-1/creating-an-auto-install-script-4175497717/)

mia_tech 03-10-2014 03:51 PM

creating an auto install script
 
guys, I'm trying to create an auto install script, which I'm passing a list of programs to be installed or just one program, and it doesn't prompt me for yes/no.

so, I'm thinking something like

Code:

while read line; do
 apt-get install $line << INSTALL
 Y
 INSTALL
done < packages.list

but somehow, it's not working

TobiSGD 03-10-2014 07:43 PM

You might want to have a look at apt-get's manpage, especially the --assume-yes option.
Anyways, be warned that this can be inherently dangerous, for example when installing a package that conflicts with an already installed package ends up with removing that package and due to the meta-package problem half of your system.


All times are GMT -5. The time now is 03:07 AM.