diff --git a/src/freedombone b/src/freedombone index 0352684f..9943d7f1 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6488,19 +6488,30 @@ function install_gogs { mkdir -p $GOPATH fi go get -u github.com/gpmgo/gopm + if [ ! "$?" = "0" ]; then + exit 479832 + fi # add a gogs user account adduser --disabled-login --gecos 'Gogs' git # clone the repo - mkdir -p $GOPATH/src/github.com/gogits + if [ ! -d $GOPATH/src/github.com/gogits ]; then + mkdir -p $GOPATH/src/github.com/gogits + fi cd $GOPATH/src/github.com/gogits git clone https://github.com/gogits/gogs.git + if [ ! "$?" = "0" ]; then + exit 78654 + fi cd gogs # install go get ./... go build + if [ ! "$?" = "0" ]; then + exit 546750 + fi echo '#! /bin/sh' > /etc/init.d/gogs echo '### BEGIN INIT INFO' >> /etc/init.d/gogs