Last weekend I had to manually update VirtualBox on my laptop.
As you can imagine, in these kind of situations my laziness takes over and then I almost suddenly start to think a smart way to get rid of the dirty job.
So I ended up writing down a simple bash script to automate the installation and upgrade processes of the Oracle VirtualBox binary on Slackware.
Here below I briefly describe how it works.
- Downloads the last stable release of the .run binary according to the system architecture
- Downloads the extension pack (.vbox-extpack) and the guest additions .iso files
- All the files are downloaded in /tmp/vbox-VERSION (for example: /tmp/vbox-5.2.22)
- Allows to install, upgrade or uninstall automatically the VirtualBox binary and the extension pack.
In order to run the script just copy the following command on your bash console and launch it (as root):
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | sh
After that, you should see the main menu as shown in the figure here below.
A quick demo
Here below you can see the script in action.
If you try the script, let me know if you have encountered some issues or if there are some possible improvements. I’m open to suggestions, as usual. The code is stored here on my GitHub.