add: snap URL-fetcher

master
zeus 2023-08-12 15:55:07 +02:00
parent 5afbb937cf
commit 4cbcd00e4e
1 changed files with 3 additions and 0 deletions

3
bash/get_snap_download_link.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
# Usage: $basename snap_packagename
PACKAGE=$1; curl -s -H 'Snap-Device-Series: 16' http://api.snapcraft.io/v2/snaps/info/$PACKAGE | jq '."channel-map" | map(select(.channel.architecture == "amd64" and .channel.name == "stable")) | .[0].download.url'