From 594147dd6f9578b75db51fa26c655038845821ea Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Thu, 28 Apr 2011 16:17:33 -0400 Subject: [PATCH] Auto-generate connect.txt --- game/txt/connect.txt => utils/makeconnect.sh | 11 ++++++++++- utils/preparedist.sh | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) rename game/txt/connect.txt => utils/makeconnect.sh (68%) mode change 100644 => 100755 diff --git a/game/txt/connect.txt b/utils/makeconnect.sh old mode 100644 new mode 100755 similarity index 68% rename from game/txt/connect.txt rename to utils/makeconnect.sh index dacba48..0e81c90 --- a/game/txt/connect.txt +++ b/utils/makeconnect.sh @@ -1,7 +1,14 @@ +#!/bin/sh +cat > connect.txt < ------------------------ 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 to create a character. Use connect to connect to your existing character. Use 'ch ' 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 + diff --git a/utils/preparedist.sh b/utils/preparedist.sh index e2a6ac1..b3b2dfe 100755 --- a/utils/preparedist.sh +++ b/utils/preparedist.sh @@ -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 -- 2.30.2