Skip to content

Instantly share code, notes, and snippets.

@gcoda
Last active December 2, 2022 00:49
Show Gist options
  • Save gcoda/c7b499ad307e2a77fc295c4c37308fb2 to your computer and use it in GitHub Desktop.
Save gcoda/c7b499ad307e2a77fc295c4c37308fb2 to your computer and use it in GitHub Desktop.
Download latest docker-desktop script
*.zst
*.rpm
*.deb
*.html

it just takes first link to .zst file mentioned on release notes page.

TODO:

  • probably should extract latest version string.
  • probably should check if latest version is already downloaded.
#!/usr/bin/env bash
set -e
curl https://docs.docker.com/desktop/release-notes/ -o release-notes.html
FIRST_ZST_URL=$(cat release-notes.html | grep -io 'href=['"'"'"][^"'"'"']*x86_64\.pkg\.tar\.zst[?'"'"'"]' | head -1 | sed -e "s/href=["'"'"']//i" -e 's/[?"'"'"']$//i')
echo " *** "
echo "Downloading $FIRST_ZST_URL"
echo " *** "
curl $FIRST_ZST_URL -o docker-desktop-latest.zst
sudo pacman -U ./docker-desktop-latest.zst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment