fix curl install
This commit is contained in:
+6
-5
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
## CONSTANTS
|
## CONSTANTS
|
||||||
|
|
||||||
BASE_ARCHIVE_URL='https://git.artcode.re/miaou/miaou-bash/archive'
|
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'
|
BASH_SHELL='/bin/bash'
|
||||||
|
|
||||||
## FUNCTIONS
|
## FUNCTIONS
|
||||||
@@ -16,10 +16,11 @@ 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=$(
|
||||||
grep -oPm1 '{"name":".*?",' |
|
curl -s "$BASE_TAG_URL" |
|
||||||
head -n1 |
|
grep '"name":' |
|
||||||
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user