Add script to get latest versions of github repos in install scripts

main
Buddy Sandidge 1 year ago
parent 26425d0815
commit 29e9aafa32

@ -14,21 +14,6 @@ source_env_file() {
)"
}
#{{ if lookPath "rg" -}}
github_install_scripts () (
rg github.com "${HOME}/.local/bin" \
| sed 's/:/ /' \
| sed 's/=/ /g' \
| awk '{print $3}' \
| sed 's|https://github.com/||g' \
| sed 's|/| |g' \
| awk '{print $1 " " $2}' \
| sed 's| |/|g' \
| sort \
| uniq
)
#{{- end }}
make_scripts() (
for FILE in "$@"; do
make_script "${FILE}"
@ -94,6 +79,31 @@ yaml_to_json() (
fi
)
#{{ if lookPath "rg" -}}
github_install_scripts () (
rg github.com "${HOME}/.local/bin" \
| sed 's/:/ /' \
| sed 's/=/ /g' \
| awk '{print $3}' \
| sed 's|https://github.com/||g' \
| sed 's|/| |g' \
| awk '{print $1 " " $2}' \
| sed 's| |/|g' \
| sort \
| uniq
)
github_install_scripts_latest_releases() (
for REPO in $(github_install_scripts); do
echo "${REPO} $(github_latest_release "${REPO}")"
done
)
#{{- end }}
github_latest_release() (
github_tags "$@" | head -n 1
)
github_releases() (
USER=${1}
REPO=${2-}

Loading…
Cancel
Save