18 lines
508 B
Bash
18 lines
508 B
Bash
#!/usr/bin/bash
|
|
source /etc/os-release
|
|
|
|
export GO=/usr/bin/go
|
|
if [[ $ID = "debian" ]]; then
|
|
export GO=/usr/lib/go-1.19/bin/go
|
|
fi
|
|
|
|
git clone https://github.com/drakkan/sftpgo sftpgo-src
|
|
cd sftpgo-src
|
|
git checkout $(git tag | tail -n 1)
|
|
cp -r openapi ./internal/bundle/openapi
|
|
cp -r templates ./internal/bundle/templates
|
|
cp -r static ./internal/bundle/static
|
|
$GO build -tags nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,nosqlite,noportable,nometrics,bundle -o /usr/local/bin/sftpgo
|
|
|
|
strip /usr/local/bin/sftpgo
|