Bash Batch Install Basics
I wrote a bash script which automatically installs a list of applications on Ubuntu. You list all the names of the apps you want to install in an array (newline-separated) and installs them one after the other, without (or with minimal) user input once it’s started.
The basis of the script is the array and the loop:
I have a list of a bunch of applications I see as essential on Linux; development tools, language packages, and so on. Keeping this list updated allows me to run the script on a new machine or in a VM and have a decent setup of the essential apps I need to work. You just run it as root from the command line and it installs one after the other automatically.
I originally added a few commands after the loop, like the MySQL install – as this requires user input (set the root password), setting git credentials, installing pear extensions for PHP, etc.
This is my first bash script so I’m still learning. It’s been really handy for me to have just to fire up whenever I need it. Obviously it’s really easy to edit and cut down to just a handful of apps if that’s all that’s required.
See the full source at github: github.com/bennuttall/bash-batch-install-basics
Any useful tips welcome – or if you know of any tools that do something similar please do share!