瀏覽代碼

some internal changes to installation

Paul Klumpp 10 年之前
父節點
當前提交
2d87df3de9
共有 1 個文件被更改,包括 20 次插入16 次删除
  1. 20 16
      install_cmp_qwbot.sh

+ 20 - 16
is_cimsqwbot.sh → install_cmp_qwbot.sh

@@ -3,6 +3,10 @@
 
 
 NEEDS="git qmake make g++"
+
+DIR_LIBQWCL="libqwclient"
+DIR_QWBOT="qwbot"
+
 for p in $NEEDS; do
   TEST=$(which $p 2> /dev/null)
 
@@ -14,24 +18,24 @@ for p in $NEEDS; do
 done
 
 
-if [ ! -d "libqwclient" ]; then
-        git clone https://gitlab.netdome.biz/mihawk/libqwclient.git
+if [ ! -d "${DIR_LIBQWCL}" ]; then
+  git clone https://gitlab.netdome.biz/mihawk/libqwclient.git ${DIR_LIBQWCL}
 	INSTALL=1
 fi
 
-if [ ! -d "qwbot" ]; then
-        git clone https://gitlab.netdome.biz/community-messaging-project/qwbot.git
+if [ ! -d "${DIR_QWBOT}" ]; then
+  git clone https://gitlab.netdome.biz/community-messaging-project/qwbot.git ${DIR_QWBOT}
 	INSTALL=1
 fi
 
-cd qwbot
-BOTPATH=$(pwd)
+cd ${DIR_QWBOT}
+PATH_QWBOT=$(pwd)
 
-cd ../libqwclient/
+cd ../${DIR_LIBQWCL}/
 LIBPATH=$(pwd)
 
-CONFIGNAME="$BOTPATH/cimsqwbot.cfg"
-STARTSCRIPTNAME="$BOTPATH/startcimsqwbot.sh"
+CONFIGNAME="${PATH_QWBOT}/cimsqwbot.cfg"
+STARTSCRIPTNAME="${PATH_QWBOT}/startcimsqwbot.sh"
 
 if [ "$INSTALL" == "1" ]; then
 
@@ -43,7 +47,7 @@ if [ "$INSTALL" == "1" ]; then
 		qmake
 		make
 
-		cd "$BOTPATH"
+		cd "${PATH_QWBOT}"
 		git pull
 		qmake
 		make
@@ -73,22 +77,22 @@ if [ "$INSTALL" == "1" ]; then
 		chmod u+x "$STARTSCRIPTNAME"
 	fi
 
-	cd "$BOTPATH"
+	cd "$PATH_QWBOT"
 	echo
 	echo "The installation is now ready to run. BUT..."
 	echo 
 	echo "1. Please know, that you need maps. The bot will start downloading them often, which takes time."
 	echo "   It is advised, you get some maps already and put them in the appropriate gamedir under"
-	echo "   $BOTPATH"
-	echo "   gamedir qw example: $BOTPATH/qw/maps"
-    echo "   gamedir fortress example: $BOTPATH/fortress/maps"
+	echo "   $PATH_QWBOT"
+	echo "   gamedir qw example: $PATH_QWBOT/qw/maps"
+    echo "   gamedir fortress example: $PATH_QWBOT/fortress/maps"
 	echo
 	echo "2. Please edit the $CONFIGNAME"
 	echo "   For an overview of configuration options, please see the wiki at:"
 	echo "   https://gitlab.netdome.biz/community-messaging-project/qwbot/wikis/home"
 	echo
 	echo "3. Now, it's cool to run:"
-	echo "   cd "$BOTPATH" && ./startcimsqwbot.sh"
+	echo "   cd "$PATH_QWBOT" && ./startcimsqwbot.sh"
 	echo
 	echo "Have fun."
 	echo
@@ -103,4 +107,4 @@ else
 	echo "Did nothing."
 	echo
 
-fi
+fi