Created
May 8, 2019 15:55
-
-
Save Roadmaster/2567ad0273b42692623d259c4a286994 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SNAP_NAME=lxd | |
info=$(curl -s https://api.snapcraft.io/v2/snaps/info/$SNAP_NAME -H "Snap-Device-Series: 16") | |
url=$(echo $info | jq -r '."channel-map"[0]."download"."url"') | |
snapid=$(echo $info | jq -r '."snap"."snap-id"') | |
# Download snap | |
echo "Downloading snap from $url" | |
#curl -LO $url | |
#Download assertion | |
echo "Downloading assertion" | |
curl -LO https://api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/$snapid?max-format=3 -H "Content-Type: application/x-ubuntu-assertion" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment