mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-15 22:10:30 +00:00
This reverts commit b64491e284.
Didn't fix the issue as mcs.exe is bugged as well, I'll just live with Mono weekly being broken and unreliable ¯\_(ツ)_/¯
47 lines
787 B
Bash
Executable File
47 lines
787 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
|
|
BUILD="Release"
|
|
UNTIL_CLEAN_EXIT=0
|
|
|
|
MONO_ARGS=("--llvm" "--server" "-O=all")
|
|
|
|
PRINT_USAGE() {
|
|
echo "Usage: $0 [--until-clean-exit] [debug/release]"
|
|
exit 1
|
|
}
|
|
|
|
for ARG in "$@"; do
|
|
case "$ARG" in
|
|
release|Release) BUILD="Release" ;;
|
|
debug|Debug) BUILD="Debug" ;;
|
|
--until-clean-exit) UNTIL_CLEAN_EXIT=1 ;;
|
|
*) PRINT_USAGE
|
|
esac
|
|
done
|
|
|
|
if [[ "$BUILD" = "Debug" ]]; then
|
|
MONO_ARGS+=("--debug")
|
|
fi
|
|
|
|
cd "$(dirname "$(readlink -f "$0")")"
|
|
|
|
BINARY="ArchiSteamFarm/bin/$BUILD/ArchiSteamFarm.exe"
|
|
|
|
if [[ ! -f "$BINARY" ]]; then
|
|
echo "ERROR: $BINARY could not be found!"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ "$UNTIL_CLEAN_EXIT" -eq 0 ]]; then
|
|
mono "${MONO_ARGS[@]}" "$BINARY"
|
|
exit $?
|
|
fi
|
|
|
|
while [[ -f "$BINARY" ]]; do
|
|
if mono "${MONO_ARGS[@]}" "$BINARY"; then
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|