diff --git a/install.sh b/install.sh index 06fd2cd8830a649d6494b80313cf443c5a305e51..a3944bbbed0b34eec19bfbd2b0ccb40e991e0f15 100755 --- a/install.sh +++ b/install.sh @@ -29,9 +29,28 @@ done #Ruby precisa de uma função especial para ser instalado através do RVM function ruby { gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 - curl -sSL https://get.rvm.io | bash -s stable + cd /tmp + curl -sSL https://get.rvm.io -o rvm.sh + cat /tmp/rvm.sh | bash -s stable --rails source $HOME/.rvm/scripts/rvm rvm install $RUBY_VERSION + cd - +} + +function unity3d { + if [[ "${DISTRO}" == 'apt-get' ]]; then + cd /tmp + curl -o unity-editor-5.5.0f3+20161125_amd64.deb http://download.unity3d.com/download_unity/linux/unity-editor-5.5.0f3+20161125_amd64.deb + $ROOT dpkg -i unity-editor-5.5.0f3+20161125_amd64.deb + cd - + else + cd /tmp + wget http://download.unity3d.com/download_unity/linux/unity-editor-installer-5.5.0f3+20161125.sh + chmod +x unity-editor-installer-5.5.0f3+20161125.sh + source unity-editor-installer-5.5.0f3+20161125.sh + cd - + fi + } function update { @@ -39,6 +58,7 @@ function update { $(echo "$ROOT $DISTRO upgrade -y") } + #Instala todos os pacotes no arquivo packages function install { PACKAGES=$(cat "$ABSOLUTE_PATH/packages.txt" | cut -d: -f2 | tr '\r\n' ' ') @@ -48,6 +68,7 @@ function fresh-install { update install $(echo "$ROOT $DISTRO install -y $PACKAGES") + unity3d ruby } @@ -64,7 +85,7 @@ function help { echo " -l lista os pacotes disponíveis" echo "exemplo de uso:" echo " $(basename "$0") php mysql ruby" - echo "AVISO: por padrão, o ruby não é instalado. Para instalar, execute $(basename "$0") ruby" + echo "AVISO: por padrão, o ruby e o unity3d não são instalados. Para instalar, execute $(basename "$0") ruby unity3d" } #Se o arquivo não existe