diff --git a/install.sh b/install.sh index ce962f7..a573652 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash ## CONSTANTS - BASE_ARCHIVE_URL='https://git.artcode.re/miaou/miaou-bash/archive' +BASE_TAG_URL='https://git.artcode.re/api/v1/repos/miaou/miaou-bash/tags' BASH_SHELL='/bin/bash' ## FUNCTIONS @@ -16,10 +16,11 @@ function install { echo INSTALL local latest_tag - latest_tag=$(curl -s https://git.artcode.re/api/v1/repos/miaou/miaou-bash/tags | - grep -oPm1 '{"name":".*?",' | - head -n1 | - cut -d'"' -f4) + latest_tag=$( + curl -s "$BASE_TAG_URL" | + grep '"name":' | + cut -d '"' -f4 + ) echo "latest_tag=$latest_tag" local tempfile='/tmp/miaou-bash-latest.tar.gz'