#!/bin/bash

# Quick script to install Guest Additions uner CentOS 7.
#   $ curl -fsSL https://gitlab.sauerburger.com/snippets/14/raw -o install-ga.sh
#   $ sudo bash install-ga.sh

set -ex
yum install -y bzip2 tar gcc make perl kernel-devel-$(uname -r)
mkdir -p /tmp/guest_additions
mount /dev/sr0 /tmp/guest_additions
/tmp/guest_additions/VBoxLinuxAdditions.run