瀏覽代碼

external starting script

Paul Klumpp 12 年之前
父節點
當前提交
028c198ef3
共有 1 個文件被更改,包括 2 次插入38 次删除
  1. 2 38
      is_cimsqwbot.sh

+ 2 - 38
is_cimsqwbot.sh

@@ -46,44 +46,8 @@ if [ "$INSTALL" == "1" ]; then
 	fi
 
 	# now, lets create a starting script in cimsqwbot
-	if [ ! -f "$STARTSCRIPTNAME" ]; then
-
-		(
-		cat <<- EOFINSTALLSCRIPT
-#!/bin/sh
-
-		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
-		EOFINSTALLSCRIPT
-		) > "$STARTSCRIPTNAME"
-
-		if [ -f "$STARTSCRIPTNAME" ]; then
-			chmod u+x "$STARTSCRIPTNAME"
-		fi
-
+	if [ -f "$STARTSCRIPTNAME" ]; then
+		chmod u+x "$STARTSCRIPTNAME"
 	fi
 
 	cd "$BOTPATH"