Created
February 20, 2017 03:56
-
-
Save yurifrl/a7c21ff0534dd4a9fb548a98f20a2a36 to your computer and use it in GitHub Desktop.
curl from github whiout knowing version
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
cd /tmp | |
repo="ginatrapani/todo.txt-cli" | |
url=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | sed -n -e '/"browser_download_url":/ s/^.*"\(.*\)".*/\1/p' | grep tar.gz) | |
wget $url -O latest.tar.gz | |
mkdir -p /usr/local/src/todo-txt | |
tar -xvzf latest.tar.gz -C /usr/local/src/todo-txt --strip-components 1 | |
rm latest.tar.gz | |
cd /usr/local/src/todo-txt && find . -iname \*.sh | xargs chmod +x | |
cp /usr/local/src/todo-txt/*.sh /usr/local/bin/ | |
mkdir -p "$TODO_ACTIONS_DIR" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment