added update nvim
This commit is contained in:
parent
ffc9fc2d95
commit
ea1633a1bc
2 changed files with 48 additions and 0 deletions
20
_home/private_dot_local/bin/executable_get-github-release.sh
Normal file
20
_home/private_dot_local/bin/executable_get-github-release.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
GH_PROJECT="${1}"
|
||||
GH_DL_TAG="${2:-latest}"
|
||||
GH_FILTER="${3:-deb}"
|
||||
if [[ ! "$GH_FILTER" =~ '(' ]]; then
|
||||
GH_FILTER="contains(\"${GH_FILTER}\")"
|
||||
fi
|
||||
SRC_URL=https://api.github.com/repos/${GH_PROJECT}/releases/${GH_DL_TAG}
|
||||
DL_URL=$( \
|
||||
curl -sL curl ${SRC_URL} \
|
||||
| jq -r " \
|
||||
.assets[] \
|
||||
| select(.browser_download_url \
|
||||
| ${GH_FILTER} ) \
|
||||
| .browser_download_url \
|
||||
")
|
||||
[[ -n "$DL_URL" ]] \
|
||||
&& printf "%s\n" $DL_URL \
|
||||
|| return 1 2>/dev/null || exit 1
|
Loading…
Add table
Add a link
Reference in a new issue