From 6b7060ab0ea30ecd10a5c0a321dcd47fc7220847 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 9 May 2016 16:46:02 +0100 Subject: [PATCH] Rename gvm directory --- src/freedombone | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/freedombone b/src/freedombone index b2a51655..a0b00483 100755 --- a/src/freedombone +++ b/src/freedombone @@ -234,7 +234,7 @@ GIT_DOMAIN_REPO="https://github.com/gogits/gogs" GIT_ADMIN_PASSWORD= GOGS_COMMIT='3fb4f7f4980b4339fd9ef6a3ba5b0acab83d264d' GO_PACKAGE_MANAGER_REPO="https://github.com/gpmgo/gopm" -GVM_HOME=/home/git/.gvm +GVM_HOME=/home/git/gvm GVM_REPO="https://github.com/moovweb/gvm" GVM_COMMIT='25ea8ae158e2861c92e2b22c458e60840157832f' @@ -6352,6 +6352,8 @@ function upgrade_golang { return fi + export GVM_ROOT=$GVM_HOME + apt-get -y install curl git mercurial make binutils bison gcc build-essential if [ ! -d $INSTALL_DIR ]; then mkdir $INSTALL_DIR @@ -6368,20 +6370,22 @@ function upgrade_golang { if [ -d /root/.gvm ]; then rm -rf /root/.gvm fi - - # TODO: this script is all over the place - # and contains hardcoded github. See if you can do better - ./binscripts/gvm-installer + sed -i "s|export GVM_ROOT=.*|export GVM_ROOT=$GVM_ROOT|g" ~/.bashrc if [ ! -d /home/git ]; then # add a gogs user account within which the gvm home directory will exist adduser --disabled-login --gecos 'Gogs' git fi - export GVM_ROOT=$GVM_HOME if [ ! -d $GVM_ROOT ]; then mkdir -p $GVM_ROOT fi + + # TODO: this script is all over the place + # and contains hardcoded github. See if you can do better + ./binscripts/gvm-installer master /home/git + + [[ -s "$GVM_ROOT/scripts/gvm" ]] && source "$GVM_ROOT/scripts/gvm" if [ ! -f $GVM_ROOT/bin/gvm ]; then echo $'gvm was not installed'