ghlatest, gets link to latest asset
parent
26c7445d62
commit
5f6108a5e2
|
@ -1,3 +1,15 @@
|
||||||
alias gitdisall="git restore ."
|
alias gitdisall="git restore ."
|
||||||
|
|
||||||
alias gitdis="git restore"
|
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
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue