Skip to content

Instantly share code, notes, and snippets.

@jeffque
Created October 4, 2018 13:53
Show Gist options
  • Save jeffque/626dafd2d7500ed6c855b461bcea5dea to your computer and use it in GitHub Desktop.
Save jeffque/626dafd2d7500ed6c855b461bcea5dea to your computer and use it in GitHub Desktop.
Baixando uma versão final
#!/bin/bash
get-major-minor() {
sed -E 's/^([^.*]\.[^.]*)\..*$/\1/' <<<"$1"
}
amazon-tc-url() {
version="$1"
major_minor=`get-major-minor "$version"`
amazon_base=https://s3-us-west-2.amazonaws.com/totalcross-release
amazon_defacto=${amazon_base}/${major_minor}/TotalCross-${version}.zip
echo $amazon_defacto
}
echo "link para download: " `amazon-tc-url 4.2.0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment