Handle errors
This commit is contained in:
parent
6962a8273c
commit
229a5d2e57
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue