#!/usr/bin/env bash # install todo.txt-cli cd /tmp _TD_URL="" until [[ -n "${_TD_URL}" ]]; do _TD_URL=$(curl -s https://api.github.com/repos/ginatrapani/todo.txt-cli/releases/latest | grep browser_download_url | head -n 1 | cut -d '"' -f 4) done wget -qO todo.txt_cli.tar.gz "${_TD_URL}" tar -xzf todo.txt_cli.tar.gz cd todo.txt_cli* chmod a+x todo.sh __USER_BIN="${HOME}/.local/bin" if [ -x "${__USER_BIN}/todo.sh" ]; then cp todo.sh "${__USER_BIN}/todo.sh" fi