diff --git a/install.sh b/install.sh index 031cd7f..8ca062e 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ ## CONSTANTS -BASE_URL='https://git.artcode.re/miaou/miaou-bash/archive' +BASE_ARCHIVE_URL='https://git.artcode.re/miaou/miaou-bash/archive' ## FUNCTIONS @@ -13,19 +13,20 @@ function upgrade { 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) - echo "latest_tag=$latest_tag" local tempfile='/tmp/miaou-bash-latest.tar.gz' - curl -so "$tempfile" "${BASE_URL}/${latest_tag}.tar.gz" + curl -so "$tempfile" "${BASE_ARCHIVE_URL}/${latest_tag}.tar.gz" sudo tar -xzf "$tempfile" --directory "$(dirname "$MIAOU_BASH_DIR")" rm "$tempfile" execute_miaou_lib initiate + echo "miaou-bash successfully $deployment_type_adjective" }