]> git.theari.com Git - cobramush.git/commitdiff
Auto-generate connect.txt
authorAri Johnson <ari@theari.com>
Thu, 28 Apr 2011 20:17:33 +0000 (16:17 -0400)
committerAri Johnson <ari@theari.com>
Thu, 28 Apr 2011 20:17:33 +0000 (16:17 -0400)
utils/makeconnect.sh [moved from game/txt/connect.txt with 68% similarity, mode: 0755]
utils/preparedist.sh

old mode 100644 (file)
new mode 100755 (executable)
similarity index 68%
rename from game/txt/connect.txt
rename to utils/makeconnect.sh
index dacba48..0e81c90
@@ -1,7 +1,14 @@
+#!/bin/sh
+cat > connect.txt <<EOSH
 <This is where you announce that they've connected to your MUSH>
 <It's a good idea to include the version/patchlevel of MUSH you're running>
 <It's a good idea to include an email address for questions about the MUSH>
------------------------ CobraMUSH-v0.73 -------------------------------------
+EOSH
+
+version=`grep VERSION ../../hdrs/version.h | sed 's/^.*"\(.*\)\"/\1/'`
+header_string="----------------------- CobraMUSH-v$version -------------------------------------"
+echo $header_string >> connect.txt
+cat >> connect.txt << EOSH
 Use create <name> <password> to create a character.
 Use connect <name> <password> to connect to your existing character.
 Use 'ch <name> <pass>' to connect hidden, and cd to connect DARK (admin)
@@ -10,3 +17,5 @@ Use the WHO command to find out who is online currently.
 -----------------------------------------------------------------------------
 Yell at your local god to personalize this file!
 
+EOSH
+
index e2a6ac1bf0bc96d1559e2340bfb1a852f7630141..b3b2dfecff77b0a69abd3beb7294c329d2d2618f 100755 (executable)
@@ -42,5 +42,8 @@ for i in hlp nws evt ; do
     cd ..
 done
 
-cd ../..
+# Step 6: Create connect.txt file
+if [ ! -f connect.txt ]; then
+    . ../../utils/makeconnect.sh
+fi