small fix
This commit is contained in:
+4
-3
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## CONSTANTS
|
## CONSTANTS
|
||||||
|
|
||||||
BASE_URL='https://git.artcode.re/miaou/miaou-bash/archive'
|
BASE_ARCHIVE_URL='https://git.artcode.re/miaou/miaou-bash/archive'
|
||||||
|
|
||||||
## FUNCTIONS
|
## FUNCTIONS
|
||||||
|
|
||||||
@@ -13,19 +13,20 @@ function upgrade {
|
|||||||
|
|
||||||
function install {
|
function install {
|
||||||
echo INSTALL
|
echo INSTALL
|
||||||
|
|
||||||
local latest_tag
|
local latest_tag
|
||||||
latest_tag=$(curl -s https://git.artcode.re/api/v1/repos/miaou/miaou-bash/tags |
|
latest_tag=$(curl -s https://git.artcode.re/api/v1/repos/miaou/miaou-bash/tags |
|
||||||
grep -oPm1 '{"name":".*?",' |
|
grep -oPm1 '{"name":".*?",' |
|
||||||
head -n1 |
|
head -n1 |
|
||||||
cut -d'"' -f4)
|
cut -d'"' -f4)
|
||||||
|
|
||||||
echo "latest_tag=$latest_tag"
|
echo "latest_tag=$latest_tag"
|
||||||
|
|
||||||
local tempfile='/tmp/miaou-bash-latest.tar.gz'
|
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")"
|
sudo tar -xzf "$tempfile" --directory "$(dirname "$MIAOU_BASH_DIR")"
|
||||||
rm "$tempfile"
|
rm "$tempfile"
|
||||||
execute_miaou_lib initiate
|
execute_miaou_lib initiate
|
||||||
|
|
||||||
echo "miaou-bash successfully $deployment_type_adjective"
|
echo "miaou-bash successfully $deployment_type_adjective"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user