mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 09:48:01 +00:00
19 lines
320 B
Bash
Executable File
19 lines
320 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
REPO=$1
|
|
|
|
if [ -z "$REPO" ]; then
|
|
echo "Usage: $0 <repo> (e.g. ivuorinen/dotfiles)"
|
|
exit 1
|
|
fi
|
|
|
|
VERSION=$(
|
|
curl -s "https://api.github.com/repos/${REPO}/releases/latest" \
|
|
| grep "tag_name" \
|
|
| awk '{print substr($2, 2, length($2)-3)}'
|
|
)
|
|
|
|
echo "$VERSION"
|
|
|
|
# vim: set ts=2 sw=2 ft=sh et:
|