diff --git a/lib/shell/install.inc b/lib/shell/install.inc index 3f72c10..4b2c337 100644 --- a/lib/shell/install.inc +++ b/lib/shell/install.inc @@ -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