| 1234567891011121314151617181920212223242526272829 | #!/bin/shset -xset -e# Set temp environment varsexport GOPATH=/tmp/goexport PATH=/usr/local/go/bin:${PATH}:${GOPATH}/binexport GO15VENDOREXPERIMENT=1# Install build depsapk --no-cache --no-progress add --virtual build-deps build-base linux-pam-dev# Build Gogsmkdir -p ${GOPATH}/src/github.com/gogits/ln -s /app/gogs/build ${GOPATH}/src/github.com/gogits/gogscd ${GOPATH}/src/github.com/gogits/gogs# Needed since git 2.9.3 or 2.9.4git config --global http.https://gopkg.in.followRedirects truemake build TAGS="sqlite cert pam"# Cleanup GOPATHrm -r $GOPATH# Remove build depsapk --no-progress del build-deps# Create git user for Gogsadduser -H -D -g 'Gogs Git User' git -h /data/git -s /bin/bash && passwd -u gitecho "export GOGS_CUSTOM=${GOGS_CUSTOM}" >> /etc/profile
 |