Files
zeal/scripts/build_windows_bat.sh
2024-09-16 19:32:45 +03:00

26 lines
627 B
Bash
Executable File

#!/bin/sh
# Create a batch file to connect with cutechess GUI on windows
if ! cargo build --release --target x86_64-pc-windows-gnu; then
echo "cargo build failed"
exit 1
fi
BUILD_DIR="../target/x86_64-pc-windows-gnu/release"
if ! cd "$BUILD_DIR"; then
echo "failed to navigate to the build directory: $BUILD_DIR"
exit 1
fi
BAT_FILE_NAME="zeal.bat"
echo ".\zeal --mode uci" > "$BAT_FILE_NAME"
echo "created "$BAT_FILE_NAME" in directory: $(pwd)"
if ! unix2dos "$BAT_FILE_NAME"; then
echo "failed to convert line endings for Windows"
exit 1
fi
echo "converted line endings for Windows successfully"