Initial build tools for linux

This commit is contained in:
JustArchi
2017-06-26 05:14:44 +02:00
parent c787beb655
commit fb59a37346
2 changed files with 27 additions and 51 deletions

24
run.sh
View File

@@ -1,11 +1,13 @@
#!/bin/bash
set -eu
BUILD="Release"
UNTIL_CLEAN_EXIT=0
PROJECT="ArchiSteamFarm"
OUT="out"
BINARY="${OUT}/${PROJECT}.dll"
ASF_ARGS=("")
BUILD="Release"
UNTIL_CLEAN_EXIT=0
PRINT_USAGE() {
echo "Usage: $0 [--until-clean-exit] [--cryptkey=] [--path=] [--server] [debug/release]"
@@ -24,15 +26,12 @@ for ARG in "$@"; do
esac
done
cd "$(dirname "$(readlink -f "$0")")"
if [[ -f "mono_envsetup.sh" ]]; then
set +u
source "mono_envsetup.sh"
set -u
if ! hash dotnet &>/dev/null; then
echo "ERROR: dotnet CLI tools are not installed!"
exit 1
fi
BINARY="ArchiSteamFarm/bin/$BUILD/ArchiSteamFarm.exe"
cd "$(dirname "$(readlink -f "$0")")"
if [[ ! -f "$BINARY" ]]; then
echo "ERROR: $BINARY could not be found!"
@@ -40,13 +39,14 @@ if [[ ! -f "$BINARY" ]]; then
fi
if [[ "$UNTIL_CLEAN_EXIT" -eq 0 ]]; then
mono "$BINARY" "${ASF_ARGS[@]}"
dotnet exec "$BINARY" "${ASF_ARGS[@]}"
exit $?
fi
while [[ -f "$BINARY" ]]; do
if mono "$BINARY" "${ASF_ARGS[@]}"; then
if dotnet exec "$BINARY" "${ASF_ARGS[@]}"; then
break
fi
sleep 1
done