Created
December 7, 2018 13:04
-
-
Save freyes/bcf934d425329f7e9ae006e16e65fda5 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# source: https://github.com/juju/charmstore-client/issues/154#issuecomment-375039544 | |
charm=${1#cs:} | |
shift | |
owner="$(charm show "cs:$charm" --format=json | jq -r '.owner.User')" | |
owner_rev="$(charm show "cs:~$owner/$charm" --format=json | jq -r '."id-revision".Revision')" | |
owner_url="cs:~$owner/$charm-$owner_rev" | |
#echo "$owner_url" | |
charm show "$owner_url" "$@"1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment