ArchiSteamFarm/run.sh

35 lines
550 B
Bash
Raw Normal View History

2016-03-29 20:58:18 +00:00
#!/bin/bash
set -eu
BUILD="Release"
MONO_ARGS=("--llvm" "--server" "-O=all")
2016-03-29 20:58:18 +00:00
PRINT_USAGE() {
echo "Usage: $0 [debug/release]"
exit 1
}
for ARG in "$@"; do
case "$ARG" in
release|Release) BUILD="Release" ;;
debug|Debug) BUILD="Debug" ;;
*) PRINT_USAGE
esac
done
2016-05-18 00:46:29 +00:00
if [[ "$BUILD" = "Debug" ]]; then
MONO_ARGS+=("--debug")
fi
cd "$(dirname "$(readlink -f "$0")")"
2016-03-29 20:58:18 +00:00
BINARY="ArchiSteamFarm/bin/$BUILD/ArchiSteamFarm.exe"
if [[ ! -f "$BINARY" ]]; then
echo "ERROR: $BINARY could not be found!"
exit 1
fi
mono "${MONO_ARGS[@]}" "$BINARY"