blob: cef08bee09a783dadaf33a6cba0b496654f70740 (
plain)
1
2
3
4
5
6
7
8
|
# An script to download from snapcraft
url="${1}"
output="${2}"
resolved_url=$(curl -H 'Snap-Device-Series: 16' https://${url#snap://} | jq '."channel-map"' | jq '.[]' | jq '[."download"."url"]' | grep -m1 https | tr -d ' ' | tr -d '"')
echo "Downloading ${output}"
curl -L -C - "${resolved_url}" -o \
"${output}"
|