mirror of
https://github.com/boolean-maybe/tiki
synced 2026-04-21 13:37:20 +00:00
improve install.sh
This commit is contained in:
parent
c925c6e900
commit
e0a46ed2f8
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_owner="boolean-maybe"
|
||||
|
|
@ -59,7 +59,8 @@ case "$arch" in
|
|||
esac
|
||||
|
||||
api_url="https://api.github.com/repos/$repo_owner/$repo_name/releases/latest"
|
||||
tag="$(fetch "$api_url" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name": *"([^"]+)".*/\1/')"
|
||||
response="$(fetch "$api_url")"
|
||||
tag="$(printf '%s' "$response" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name": *"([^"]+)".*/\1/')"
|
||||
if [ -z "$tag" ]; then
|
||||
say "failed to resolve latest release tag"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue