|
@@ -6488,19 +6488,30 @@ function install_gogs {
|
6488
|
6488
|
mkdir -p $GOPATH
|
6489
|
6489
|
fi
|
6490
|
6490
|
go get -u github.com/gpmgo/gopm
|
|
6491
|
+ if [ ! "$?" = "0" ]; then
|
|
6492
|
+ exit 479832
|
|
6493
|
+ fi
|
6491
|
6494
|
|
6492
|
6495
|
# add a gogs user account
|
6493
|
6496
|
adduser --disabled-login --gecos 'Gogs' git
|
6494
|
6497
|
|
6495
|
6498
|
# clone the repo
|
6496
|
|
- mkdir -p $GOPATH/src/github.com/gogits
|
|
6499
|
+ if [ ! -d $GOPATH/src/github.com/gogits ]; then
|
|
6500
|
+ mkdir -p $GOPATH/src/github.com/gogits
|
|
6501
|
+ fi
|
6497
|
6502
|
cd $GOPATH/src/github.com/gogits
|
6498
|
6503
|
git clone https://github.com/gogits/gogs.git
|
|
6504
|
+ if [ ! "$?" = "0" ]; then
|
|
6505
|
+ exit 78654
|
|
6506
|
+ fi
|
6499
|
6507
|
cd gogs
|
6500
|
6508
|
|
6501
|
6509
|
# install
|
6502
|
6510
|
go get ./...
|
6503
|
6511
|
go build
|
|
6512
|
+ if [ ! "$?" = "0" ]; then
|
|
6513
|
+ exit 546750
|
|
6514
|
+ fi
|
6504
|
6515
|
|
6505
|
6516
|
echo '#! /bin/sh' > /etc/init.d/gogs
|
6506
|
6517
|
echo '### BEGIN INIT INFO' >> /etc/init.d/gogs
|