Bladeren bron

general start script

Paul Klumpp 12 jaren geleden
bovenliggende
commit
f495318617
1 gewijzigde bestanden met toevoegingen van 28 en 0 verwijderingen
  1. 28 0
      startcimsqwbot.sh

+ 28 - 0
startcimsqwbot.sh

@@ -0,0 +1,28 @@
+#!/bin/bash
+
+BOTPATH="$pwd"
+LIBPATH="$BOTPATH/../libqwclient/"
+if [ "$(which realpath)" != "" ]; then
+	LIBPATH="$(realpath $LIBPATH)"
+fi
+
+echo BOTPATH: "$BOTPATH"
+echo LIBPATH: "$LIBPATH"
+
+while [ 1 ]; do
+	cd "$LIBPATH"
+	git pull
+	qmake
+	make
+
+	cd "$BOTPATH"
+	git pull
+	qmake
+	make
+
+	echo started at $(date) >> runlog.log
+	LD_LIBRARY_PATH="$LIBPATH" stdbuf -oL ./cimsqwbot | tee -a runlog.log
+	echo crashed at $(date) - lol, we never crash. >> runlog.log
+
+	sleep 3
+done