diff --git a/featlib/curl.sh b/featlib/curl.sh new file mode 100644 index 0000000..745980f --- /dev/null +++ b/featlib/curl.sh @@ -0,0 +1,17 @@ +#! /bin/bash -- +[ ! -z "${GREZZO_1604316819}" ] && return; GREZZO_1604316819=0 + +function feat_addpacks_curl() { + if ! feat_missing "apt-get"; then + sudo apt-get install -y curl + elif ! feat_missing "pacman"; then + sudo pacman -S --needed curl + elif ! feat_missing "apk"; then + sudo apk add --no-cache curl + fi +} + +function feat_add_curl() { + feat_addpacks_curl +} + diff --git a/featlib/pip.sh b/featlib/pip.sh index d13e2e0..b561387 100755 --- a/featlib/pip.sh +++ b/featlib/pip.sh @@ -1,6 +1,8 @@ #! /bin/bash -- [ ! -z "${GREZZO_1577142035}" ] && return; GREZZO_1577142035=0 +. "$(this_script_path)/curl.sh" + function feat_addpacks_pip_dev() { if ! feat_missing "apt-get"; then sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ @@ -24,6 +26,7 @@ function feat_addpacks_pip_dev() { } function feat_add_pip() { + feat_needed curl feat_addpacks_pip_dev sed -n -e '/# Load pyenv automatically/,$p' \ <(curl https://pyenv.run | bash 2>&1) \ diff --git a/featlib/poetry.sh b/featlib/poetry.sh index 97530ac..24bdd67 100644 --- a/featlib/poetry.sh +++ b/featlib/poetry.sh @@ -2,9 +2,11 @@ [ ! -z "${GREZZO_1577142078}" ] && return; GREZZO_1577142078=0 . "$(this_script_path)/pip.sh" +. "$(this_script_path)/curl.sh" function feat_add_poetry() { feat_needed "pip" + feat_needed "curl" curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python . "$HOME/.poetry/env" } diff --git a/featlib/rustup.sh b/featlib/rustup.sh new file mode 100644 index 0000000..2314f44 --- /dev/null +++ b/featlib/rustup.sh @@ -0,0 +1,11 @@ +#! /bin/bash -- +[ ! -z "${GREZZO_1604315952}" ] && return; GREZZO_1604315952=0 + +. "$(this_script_path)/curl.sh" + +function feat_add_rustup() { + feat_needed "curl" + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . "$HOME/.cargo/env" +} +