From c9a257bebf5e8fe4333fa16e362d90283454cf4e Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 10 Nov 2020 17:45:30 -0500 Subject: [PATCH] Update TGS4 PreCompile.sh (#54794) * Update TGS4 PreCompile.sh - Fix bad brackets - Update rust-g build command - Remove `--default-host` * Add i686-unknown-linux-gnu target --- tools/tgs4_scripts/PreCompile.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tgs4_scripts/PreCompile.sh b/tools/tgs4_scripts/PreCompile.sh index 545997c1120..ef16cdd900c 100755 --- a/tools/tgs4_scripts/PreCompile.sh +++ b/tools/tgs4_scripts/PreCompile.sh @@ -23,12 +23,12 @@ set -e # install cargo if needful if ! [ -x "$has_cargo" ]; then echo "Installing rust..." - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host i686-unknown-linux-gnu + curl https://sh.rustup.rs -sSf | sh -s -- -y . ~/.profile fi # apt packages, libssl needed by rust-g but not included in TGS barebones install -if ! { [ -x "$has_git" ] && [ -x "$has_grep" ] && [ -f "/usr/lib/i386-linux-gnu/libssl.so" ] }; then +if ! ( [ -x "$has_git" ] && [ -x "$has_grep" ] && [ -f "/usr/lib/i386-linux-gnu/libssl.so" ] ); then echo "Installing apt dependencies..." if ! [ -x "$has_sudo" ]; then dpkg --add-architecture i386 @@ -47,16 +47,16 @@ fi if [ ! -d "rust-g" ]; then echo "Cloning rust-g..." git clone https://github.com/tgstation/rust-g + cd rust-g + rustup target add i686-unknown-linux-gnu else echo "Fetching rust-g..." cd rust-g git fetch - cd .. fi echo "Deploying rust-g..." -cd rust-g git checkout "$RUST_G_VERSION" -~/.cargo/bin/cargo build --release +~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu mv target/release/librust_g.so "$1/rust_g" cd ..