From 2f647430522333854a51aaed8bce48627ef0c30c Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 23 Jan 2024 21:56:17 +0100 Subject: [PATCH] moved manual rust installation to gentoo --- configure.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.sh b/configure.sh index 76bde34..d88fc05 100755 --- a/configure.sh +++ b/configure.sh @@ -29,9 +29,9 @@ ARCH_GENTOO_COMMON="$COMMON json-c curl libgit2" # Get COMMAND if [[ $DISTRO == "Arch" ]]; then - COMMAND="pacman -S --needed --noconfirm $ARCH_GENTOO_COMMON libyaml" + COMMAND="pacman -S --needed --noconfirm $ARCH_GENTOO_COMMON libyaml cargo" elif [[ $DISTRO == "Ubuntu" ]] || [[ $DISTRO == "Debian" ]]; then - COMMAND="apt install -y $COMMON libjson-c-dev libcurl4-nss-dev libgit2-dev libyaml-dev" + COMMAND="apt install -y $COMMON libjson-c-dev libcurl4-nss-dev libgit2-dev libyaml-dev cargo" elif [[ $DISTRO == "Gentoo" ]]; then COMMAND="emerge -vn $ARCH_GENTOO_COMMON dev-libs/libyaml" @@ -40,6 +40,12 @@ elif [[ $DISTRO == "Gentoo" ]]; then echo "LDPATH=/usr/lib/libwhy2-logger.so" > /etc/env.d/99why2-logger echo "LDPATH=/usr/lib/libwhy2-chat.so" > /etc/env.d/99why2-chat env-update && source /etc/profile + + # Install Rust + if ! [ -x "$(command -v cargo)" ]; then + curl https://sh.rustup.rs -sSf | sh # Install Rust and components + source "$HOME/.cargo/env" + fi else # 'Unsupported' distro echo "It seems you are using unsupported distribution... Don't worry, just install 'gcc', 'json-c', 'curl', 'libgit2', 'tmux', 'libyaml' and 'make' and you'll be fine." @@ -49,11 +55,5 @@ fi # Execute COMMAND $COMMAND -# Install Rust -if ! [ -x "$(command -v cargo)" ]; then - curl https://sh.rustup.rs -sSf | sh -s -- -y # Install Rust and components - source "$HOME/.cargo/env" -fi - # Config Rust version rustup default stable \ No newline at end of file