2022-05-09 02:40:29 +02:00
|
|
|
#!/usr/bin/bash
|
|
|
|
source /etc/os-release
|
2023-02-07 19:52:54 +01:00
|
|
|
|
2022-05-09 02:40:29 +02:00
|
|
|
export GO=/usr/bin/go
|
2023-02-07 19:52:54 +01:00
|
|
|
if [[ $OS = "debian" ]]; then
|
2022-10-31 23:51:38 +01:00
|
|
|
export GO=/usr/lib/go-1.19/bin/go
|
2022-05-09 02:40:29 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
git clone https://github.com/drakkan/sftpgo /root/sftpgo-src
|
|
|
|
cd /root/sftpgo-src
|
2023-02-07 19:52:54 +01:00
|
|
|
git checkout $(git tag | tail -n 1)
|
2022-10-31 23:51:38 +01:00
|
|
|
$GO build -o /usr/local/bin/sftpgo
|