Created
December 14, 2022 18:03
-
-
Save Nitecon/0340080389c9a371d6e18e37392a799f to your computer and use it in GitHub Desktop.
This file contains 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
# This takes an owner of a repo, the repo name iteself and then looks up latest tag and gets the tarball url downloads the file. | |
# then extracts it to /tmp/$REPO | |
OWNER=iMicknl;REPO=ha-nest-protect; curl -o ${REPO}.tar.gz -L $(curl -s https://api.github.com/repos/${OWNER}/${REPO}/releases/latest | grep "tarball_url" | cut -d : -f 2,3 | tr -d \"|tr -d , | awk '{$1=$1};1') && mkdir -p /tmp/${REPO}; tar -xf ${REPO}.tar.gz --strip-components=1 -C /tmp/${REPO} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment