shell-base/load/alias/02-git

15 lines
336 B
Plaintext
Raw Normal View History

alias gitdisall="git restore ."
2024-04-22 17:01:01 -07:00
alias gitdis="git restore"
ghlatest () {
OWNER=${GOWNER:-$1}
REPO=${GREPO:-$2}
ARCH=${RARCH:-$3}
ARCH=${ARCH:-linux_amd64}
dwnld=$(wget https://api.github.com/repos/$OWNER/$REPO/releases/latest -q -O - | awk -F \" -v RS="," '/browser_download_url/ {print $(NF-1)}' | grep $ARCH)
echo $dwnld
}