Browse Source

some internal changes to installation

Paul Klumpp 10 years ago
parent
commit
2d87df3de9
1 changed files with 20 additions and 16 deletions
  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++"
 NEEDS="git qmake make g++"
+
+DIR_LIBQWCL="libqwclient"
+DIR_QWBOT="qwbot"
+
 for p in $NEEDS; do
 for p in $NEEDS; do
   TEST=$(which $p 2> /dev/null)
   TEST=$(which $p 2> /dev/null)
 
 
@@ -14,24 +18,24 @@ for p in $NEEDS; do
 done
 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
 	INSTALL=1
 fi
 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
 	INSTALL=1
 fi
 fi
 
 
-cd qwbot
-BOTPATH=$(pwd)
+cd ${DIR_QWBOT}
+PATH_QWBOT=$(pwd)
 
 
-cd ../libqwclient/
+cd ../${DIR_LIBQWCL}/
 LIBPATH=$(pwd)
 LIBPATH=$(pwd)
 
 
-CONFIGNAME="$BOTPATH/cimsqwbot.cfg"
-STARTSCRIPTNAME="$BOTPATH/startcimsqwbot.sh"
+CONFIGNAME="${PATH_QWBOT}/cimsqwbot.cfg"
+STARTSCRIPTNAME="${PATH_QWBOT}/startcimsqwbot.sh"
 
 
 if [ "$INSTALL" == "1" ]; then
 if [ "$INSTALL" == "1" ]; then
 
 
@@ -43,7 +47,7 @@ if [ "$INSTALL" == "1" ]; then
 		qmake
 		qmake
 		make
 		make
 
 
-		cd "$BOTPATH"
+		cd "${PATH_QWBOT}"
 		git pull
 		git pull
 		qmake
 		qmake
 		make
 		make
@@ -73,22 +77,22 @@ if [ "$INSTALL" == "1" ]; then
 		chmod u+x "$STARTSCRIPTNAME"
 		chmod u+x "$STARTSCRIPTNAME"
 	fi
 	fi
 
 
-	cd "$BOTPATH"
+	cd "$PATH_QWBOT"
 	echo
 	echo
 	echo "The installation is now ready to run. BUT..."
 	echo "The installation is now ready to run. BUT..."
 	echo 
 	echo 
 	echo "1. Please know, that you need maps. The bot will start downloading them often, which takes time."
 	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 "   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
 	echo "2. Please edit the $CONFIGNAME"
 	echo "2. Please edit the $CONFIGNAME"
 	echo "   For an overview of configuration options, please see the wiki at:"
 	echo "   For an overview of configuration options, please see the wiki at:"
 	echo "   https://gitlab.netdome.biz/community-messaging-project/qwbot/wikis/home"
 	echo "   https://gitlab.netdome.biz/community-messaging-project/qwbot/wikis/home"
 	echo
 	echo
 	echo "3. Now, it's cool to run:"
 	echo "3. Now, it's cool to run:"
-	echo "   cd "$BOTPATH" && ./startcimsqwbot.sh"
+	echo "   cd "$PATH_QWBOT" && ./startcimsqwbot.sh"
 	echo
 	echo
 	echo "Have fun."
 	echo "Have fun."
 	echo
 	echo
@@ -103,4 +107,4 @@ else
 	echo "Did nothing."
 	echo "Did nothing."
 	echo
 	echo
 
 
-fi
+fi