From 127fb151f32a68fa206f8134321d74c930fcf4df Mon Sep 17 00:00:00 2001 From: Gabriel Olescki <go15@inf.ufpr.br> Date: Mon, 15 May 2017 09:08:37 -0300 Subject: [PATCH] =?UTF-8?q?Adicionando=20instala=C3=A7=C3=A3o=20do=20ruby,?= =?UTF-8?q?=20rails=20e=20unity3d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 06fd2cd..a3944bb 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 -- GitLab