Last active
August 29, 2015 13:56
-
-
Save amercier/9185219 to your computer and use it in GitHub Desktop.
bash <(curl -# -L https://gist.github.com/amercier/9185219/raw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [ "`whoami`" != "root" ]; then | |
| echo "You must execute this script as root" >&2 | |
| exit 1 | |
| fi | |
| echo ".---------------------------." | |
| echo "| VMware tools installation |" | |
| echo "'---------------------------'" | |
| cd /home \ | |
| && (which aptitude > /dev/null && aptitude install gcc make linux-headers-amd64 || exit 0) \ | |
| && (which yum > /dev/null && yum install gcc make kernel-headers perl tar || exit 0) \ | |
| && (grep "blacklist i2c-piix4" /etc/modprobe.d/blacklist.conf >/dev/null || echo "blacklist i2c-piix4" >> /etc/modprobe.d/blacklist.conf) \ | |
| && ([ -d /media/cdrom ] || mkdir -p /media/cdrom) \ | |
| && ([ -e /media/cdrom/VMwareTools-*.tar.gz ] || mount /dev/cdrom /media/cdrom) \ | |
| && tar xvfz /media/cdrom/VMwareTools-*.tar.gz \ | |
| && cd vmware-tools-distrib/ \ | |
| && ./vmware-install.pl --default \ | |
| && cd /home \ | |
| && rm -rf vmware-tools-distrib \ | |
| && echo ".------------------------------------." \ | |
| && echo "| VMware tools installed successfully |" \ | |
| && echo "'------------------------------------'" \ | |
| && echo -n 'VMware tools v' \ | |
| && vmware-toolbox-cmd -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment