Skip to content

Instantly share code, notes, and snippets.

@raghunayak
Last active July 25, 2020 14:02
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 raghunayak/5e99fc8f95f1742846bc9c9ae9d8f858 to your computer and use it in GitHub Desktop.
Save raghunayak/5e99fc8f95f1742846bc9c9ae9d8f858 to your computer and use it in GitHub Desktop.
URL="https://download.qt.io/snapshots/qtcreator/"
main_ver=$(wget -qO- ${URL} | sed 's/</\'$'\n''</g' | sed -ne '/<table>$/,$ p' | grep -m1 -oP 'href="\K\d+\.\d+\.?\d*')
URL=${URL}${main_ver}/
sub_ver=$(wget -qO- ${URL} | sed 's/</\'$'\n''</g' | sed -ne '/<table>$/,$ p' | grep -m1 -oP 'href="\K\d+\.\d+\.?\d*')
URL=${URL}${sub_ver}/
package=$(wget -qO- ${URL} | sed 's/</\'$'\n''</g' | sed -ne '/<table>$/,$ p' | grep -m1 -oP 'href=".+">\K(.+\.run)')
wget -c $URL$package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment