|
#!/usr/bin/bash
|
|
source /etc/os-release
|
|
|
|
export GO=/usr/bin/go
|
|
if [[ $OS = "debian" ]]; then
|
|
export GO=/usr/lib/go-1.19/bin/go
|
|
fi
|
|
|
|
git clone https://github.com/drakkan/sftpgo /root/sftpgo-src
|
|
cd /root/sftpgo-src
|
|
git checkout $(git tag | tail -n 1)
|
|
$GO build -o /usr/local/bin/sftpgo
|