oneliners/bash/get_snap_download_link.sh

4 lines
263 B
Bash
Raw Normal View History

2023-08-12 15:55:07 +02:00
#!/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'