Created
January 9, 2011 18:25
-
-
Save wyanez/771880 to your computer and use it in GitHub Desktop.
[bash]Script de Instalación de VirtualBox
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
#!/bin/bash | |
# | |
# Script de Instalación de VirtualBox | |
# William Yanez - actualizado al 09-01-2011 | |
# | |
# Uso: ./instalar_virtualbox.sh VERSION DISTRO | |
# | |
if [ -z "$1" ]; then | |
VERSION="4.0" | |
else | |
VERSION=$1 | |
fi; | |
if [ -z "$2" ]; then | |
DIST="lucid" | |
else | |
DIST=$2 | |
fi; | |
echo "Comenzando Instalación de Virtual Box $VERSION para $DIST" | |
COUNT_VB=$(grep -c virtualbox /etc/apt/sources.list) | |
if [ "$COUNT_VB" -gt 0 ]; then | |
echo "Ya existe en /etc/apt/sources.list el repositorio de virtualbox" | |
else | |
echo "deb http://download.virtualbox.org/virtualbox/debian $DIST contrib">>/etc/apt/sources.list | |
fi; | |
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install -y virtualbox-$VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment