mirror of
https://github.com/ovh/the-bastion.git
synced 2025-01-01 13:01:53 +08:00
fix: freebsd: install script: prefer fetch over curl
This commit is contained in:
parent
45cfb78b0b
commit
850c8cabd4
1 changed files with 8 additions and 8 deletions
|
@ -29,14 +29,6 @@ set_download_url() {
|
|||
_download() {
|
||||
wget -q "$1"
|
||||
}
|
||||
elif command -v curl >/dev/null; then
|
||||
action_done curl
|
||||
_apicall() {
|
||||
curl -sL -H 'Accept: application/vnd.github.v3+json' "$1" || true
|
||||
}
|
||||
_download() {
|
||||
curl -sL -O "$1"
|
||||
}
|
||||
elif command -v fetch >/dev/null; then
|
||||
action_done fetch
|
||||
_apicall() {
|
||||
|
@ -45,6 +37,14 @@ set_download_url() {
|
|||
_download() {
|
||||
fetch "$1"
|
||||
}
|
||||
elif command -v curl >/dev/null; then
|
||||
action_done curl
|
||||
_apicall() {
|
||||
curl -sL -H 'Accept: application/vnd.github.v3+json' "$1" || true
|
||||
}
|
||||
_download() {
|
||||
curl -sL -O "$1"
|
||||
}
|
||||
else
|
||||
action_error "Couldn't find wget, curl nor fetch"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue