Add user prompt to fetch-borg-latest
Environment Setup Test / Setup (push) Successful in 1m7s Details

pull/4/head
drunkendog 2023-08-27 21:35:39 +01:00
parent 2bbe534107
commit 2442f2eed6
1 changed files with 12 additions and 1 deletions

View File

@ -2,5 +2,16 @@
set -e
wget -4 -O /usr/local/bin/borg-linux64 $(curl -s https://api.github.com/repos/borgbackup/borg/releases/latest| jq -r '.assets | .[] | select(.name == "borg-linux64") | .browser_download_url')
download_version=curl -s https://api.github.com/repos/borgbackup/borg/releases/latest | jq -r '.name'
download_url=curl -s https://api.github.com/repos/borgbackup/borg/releases/latest | jq -r '.assets | .[] | select(.name == "borg-linux64") | .browser_download_url'
echo "Version: $download_version"
echo "URL: $download_url"
echo 'Continue (y/N)?'
read answer
if [ "$answer" == "${answer#[Yy]}" ] ;then
exit 1
fi
wget -4 -O /usr/local/bin/borg-linux64 $download_url
chmod -v +x /usr/local/bin/borg-linux64