Last active
July 24, 2024 20:46
-
-
Save adamz01h/19d4cffa00e9b06ac33d514487d70744 to your computer and use it in GitHub Desktop.
lazydockerdownload
This file contains hidden or 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
| # map different architecture variations to the available binaries | |
| ARCH=$(uname -m) | |
| case $ARCH in | |
| i386|i686) ARCH=x86 ;; | |
| armv6*) ARCH=armv6 ;; | |
| armv7*) ARCH=armv7 ;; | |
| aarch64*) ARCH=arm64 ;; | |
| esac | |
| # prepare the download URL | |
| GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') | |
| GITHUB_FILE="lazydocker_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz" | |
| GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}" | |
| # install/update the local binary | |
| curl -L -o lazydocker.tar.gz $GITHUB_URL | |
| tar xzvf lazydocker.tar.gz lazydocker | |
| rm lazydocker.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment