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
This commit is contained in:
Jordan Brown
2020-11-11 11:45:30 +13:00
committed by GitHub
parent 33ea5b6956
commit c9a257bebf
+5 -5
View File
@@ -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 ..