22 lines
618 B
Bash
Executable File
22 lines
618 B
Bash
Executable File
#!/bin/sh
|
|
name=term_minesweeper
|
|
linux="x86_64-unknown-linux-gnu"
|
|
windows="x86_64-pc-windows-gnu"
|
|
platform=$linux
|
|
echo $platform
|
|
|
|
if [ $platform != $windows ]; then
|
|
RUSTFLAGS="-Zlocation-detail=none" cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort \
|
|
--target $platform --release
|
|
else
|
|
cargo build --target $platform --release
|
|
fi
|
|
|
|
if [ $platform != $windows ]; then
|
|
upx --best --lzma target/$platform/release/$name
|
|
cp target/$platform/release/$name $name
|
|
else
|
|
upx --best --lzma target/$platform/release/$name.exe
|
|
cp target/$platform/release/$name.exe $name.exe
|
|
fi
|