Skip to content

Instantly share code, notes, and snippets.

@wbob
Created October 29, 2017 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbob/d0410eca254c7a835f2771f11609c220 to your computer and use it in GitHub Desktop.
Save wbob/d0410eca254c7a835f2771f11609c220 to your computer and use it in GitHub Desktop.
shopware download shell aliases
# shopware downloaders, "jq" package required
alias sw-getlatest="echo '# get latest install release'; curl -s 'http://update-api.shopware.com/v1/releases/install' | jq '.[0].uri' | xargs -I{} wget --quiet --show-progress {}"
alias sw-getupdate="echo '# get latest update of stable branch'; curl -s 'http://update-api.shopware.com/v1/release/update?shopware_version=5&channel=stable' | jq '.uri' | xargs wget --quiet --show-progress"
sw-getrelease() { echo "# get specific release"; if [ -z "$*" ]; then echo "# no version given. usage 'sw-getrelease <version>'"; return 0; fi; VER="$1"; curl -s http://update-api.shopware.com/v1/releases/install | jq '.[] | select(.version=='\"$VER\"') | .uri' | xargs wget --quiet --show-progress; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment