From 16d40a42908b169c27d4807881eacfe1351c2a9b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 15 Dec 2015 10:52:13 +0000 Subject: [PATCH] gogs path --- src/freedombone | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/freedombone b/src/freedombone index 01dfb3ce..1c5db68f 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6116,18 +6116,16 @@ function install_gogs { export GOPATH=/home/git/go # update to the next commit - if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then + if [ -d /var/www/$GIT_DOMAIN_NAME ]; then if grep -q "Gogs commit" $COMPLETION_FILE; then CURRENT_GOGS_COMMIT=$(grep "Gogs commit" $COMPLETION_FILE | awk -F ':' '{print $2}') if [[ "$CURRENT_GOGS_COMMIT" != "$GOGS_COMMIT" ]]; then - cd /var/www/$GIT_DOMAIN_NAME/htdocs + cd $GOPATH/src/github.com/gogits/gogs git stash git checkout master git pull git checkout $GOGS_COMMIT -b $GOGS_COMMIT sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE - chown -R www-data:www-data /var/www/$GIT_DOMAIN_NAME/htdocs - cd $GOPATH/src/github.com/gogits/gogs go get -u ./... go build systemctl restart gogs