diff --git a/bash/get_snap_download_link.sh b/bash/get_snap_download_link.sh new file mode 100755 index 0000000..c5ba0d0 --- /dev/null +++ b/bash/get_snap_download_link.sh @@ -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'