remove dependency to wget
This commit is contained in:
@@ -15,7 +15,7 @@ It's Free Software (AGPLv3), help yourself.
|
|||||||
Any feedback would be appreciated. [contact@artcode.re](mailto:contact@artcode.re)
|
Any feedback would be appreciated. [contact@artcode.re](mailto:contact@artcode.re)
|
||||||
|
|
||||||
## install
|
## install
|
||||||
`curl https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash -s -- --host`
|
`curl https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash -s`
|
||||||
|
|
||||||
## upgrade
|
## upgrade
|
||||||
`upgrade-miaou-bash`
|
`upgrade-miaou-bash`
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ if [[ $CURDIR != '/opt/miaou-bash' ]]; then
|
|||||||
rm -rf /opt/miaou-bash
|
rm -rf /opt/miaou-bash
|
||||||
|
|
||||||
push_directory "$(mktemp -d)"
|
push_directory "$(mktemp -d)"
|
||||||
wget $MAIN_TAR_GZ_URL
|
curl --no-progress-meter -O $MAIN_TAR_GZ_URL
|
||||||
tar -xzf main.tar.gz
|
tar -xzf main.tar.gz
|
||||||
mv miaou-bash /opt/
|
mv miaou-bash /opt/
|
||||||
pop_directory
|
pop_directory
|
||||||
|
|||||||
+10
-12
@@ -20,24 +20,22 @@ function usage {
|
|||||||
|
|
||||||
function get_github {
|
function get_github {
|
||||||
local BASE="https://github.com"
|
local BASE="https://github.com"
|
||||||
local release=$( wget_semver $REPO_TYPE $REPO_NAME )
|
local release=$(wget_semver $REPO_TYPE $REPO_NAME)
|
||||||
local url="$BASE/${REPO_NAME}/archive/refs/tags/${release}.tar.gz"
|
local url="$BASE/${REPO_NAME}/archive/refs/tags/${release}.tar.gz"
|
||||||
if [[ -d $DESTINATION ]]; then
|
if [[ -d $DESTINATION ]]; then
|
||||||
DESTINATION="$DESTINATION/$(echo $REPO_NAME | cut -d '/' -f2 )-${release}.tgz"
|
DESTINATION="$DESTINATION/$(echo $REPO_NAME | cut -d '/' -f2)-${release}.tgz"
|
||||||
fi
|
fi
|
||||||
>&2 wget $url -O $DESTINATION
|
curl >&2 --no-progress-meter $url -o $DESTINATION
|
||||||
echo $DESTINATION
|
echo "$DESTINATION"
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ $# -lt 2 ]] && usage
|
[[ $# -lt 2 ]] && usage
|
||||||
|
|
||||||
case $REPO_TYPE in
|
case $REPO_TYPE in
|
||||||
github )
|
github)
|
||||||
get_github
|
get_github
|
||||||
;;
|
;;
|
||||||
* )
|
*)
|
||||||
echo "repository type <${REPO_TYPE}> not yet supported!" && exit 1
|
echo "repository type <${REPO_TYPE}> not yet supported!" && exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user