Hi folks!
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.
Features
- Downloads the latest release of the .run binary according to the system architecture and the value of the BRANCH parameter passed by the user
- 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.
Script usage
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
This will automatically download and install the latest version of VirtualBox and the corresponding extension pack. It will also download the guest additions.
If you want to have the latest stable release instead, launch:
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | BRANCH=stable sh
Finally, if you want to try the latest beta release, do:
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | BRANCH=beta 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.