From 8cfca6f530c53e1d100a291307e6147864b7f3c3 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Sun, 16 Mar 2025 02:04:47 +0100 Subject: [PATCH] advance cross-build.sh --- cross-build.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cross-build.sh b/cross-build.sh index 242650e..281568f 100755 --- a/cross-build.sh +++ b/cross-build.sh @@ -7,11 +7,40 @@ # requirements # - this script only runs on debianoid OS (Debian, Ubuntu, Kubuntu, ... having dpkg) +git branch + +# init submodules, if not done yet. running multiple times does not matter +git submodule update --init --recursive + +# pull latest stuff from submodules +git pull --recurse-submodules + echo -e "\n+++++++++++++++++++++++++++++++++++++++++++" echo -e "installing requirements ..." echo -e "+++++++++++++++++++++++++++++++++++++++++++\n" sudo apt install podman gsasl libgsasl7-dev libssl-dev libclang-dev cmake clang capnproto mosquitto mosquitto-clients build-essential libpcsclite-dev + +if ! command -v rustup 2>&1 >/dev/null +then + echo -e "Istalling rustup with stable rust + cargo..." + curl https://sh.rustup.rs -sSf | sh + echo 'source "$HOME/.cargo/env"' >> ~/.bashrc + source ~/.bashrc + rustup install stable + rustup default stable + echo -e "rustup installed:" + rustc +stable --version + cargo +stable --version +else + echo -e "rustup found:" + rustc +stable --version + cargo +stable --version + echo -e "rustup: updating ..." + rustup update +fi + +echo -e "Installing cross-rs ..." cargo install cross echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"