CVS references removed and special case reconducted to normal case
[brisk.git] / INSTALL.sh
index a82e530..3bd354d 100755 (executable)
@@ -3,17 +3,22 @@
 #
 # Defaults
 #
+CONFIG_FILE="$HOME/.brisk_install"
+
 players_n=3
-tables_n=16
-tables_auth_n=6
-brisk_auth_conf="brisk_auth2.conf.pho"
-brisk_debug="0xffff"
-web_path="$HOME/brisk"
-legal_path="$HOME/brisk-priv"
-ftok_path="$HOME/brisk-priv/ftok"
-proxy_path="$HOME/brisk-priv/proxy"
+tables_n=44
+tables_auth_n=12
+brisk_auth_conf="brosk_auth.conf.pho"
+brisk_debug="0x0400"
+# brisk_debug="0xffff"
+web_path="/home/nastasi/web/brosk"
+ftok_path="/home/nastasi/brisk-priv/ftok/brosk"
+proxy_path="/home/nastasi/brisk-priv/proxy/brosk"
+legal_path="/home/nastasi/brisk-priv/brosk"
+cookie_path="/brosk/"
+brisk_conf="brosk.conf.pho"
 web_only="FALSE"
-brisk_conf="brisk.conf.pho"
+
 
 if [ "$1" = "chk" ]; then
     set -e
@@ -49,8 +54,8 @@ if [ "$1" = "pkg" ]; then
     exit 0
 fi
     
-if [ -f $HOME/.brisk_install ]; then
-   . $HOME/.brisk_install
+if [ -f "$CONFIG_FILE" ]; then
+   source "$CONFIG_FILE"
 fi
 
 if [ "x$cookie_path" = "x" ]; then
@@ -196,6 +201,8 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
+IFS='
+'
 #
 #  Installation
 #
@@ -246,7 +253,7 @@ if [ "$web_only" = "FALSE" ]; then
         chmod 777 ${ftokk_path}/bin5
     fi
 
-    for i in $(seq 0 $max_players); do
+    for i in $(seq 0 $((tables_n - 1))); do
         if [ ! -d ${ftokk_path}/bin5/table$i ]; then
             mkdir ${ftokk_path}/bin5/table$i
         fi
@@ -257,27 +264,23 @@ if [ "$web_only" = "FALSE" ]; then
             touch ${ftokk_path}/bin5/table$i/user$e
             chmod 666 ${ftokk_path}/bin5/table$i/user$e
         done
+        # create subdirectories in proxy path
+        if [ ! -d ${proxy_path}/bin5/table$i ]; then
+            mkdir -p ${proxy_path}/bin5/table$i
+        fi
     done
+    chmod -R 777 ${proxy_path}/bin5
 
-    # create subdirectories in proxy path
-    if [ ! -d ${proxy_path}/bin5 ]; then
-        mkdir ${proxy_path}/bin5
-    fi
-    chmod 777 ${proxy_path}/bin5
 fi
 install -d ${web_path}__
-for i in $(find web -type d | grep -v /CVS | sed 's/^....//g'); do
+for i in $(find web -type d | sed 's/^....//g'); do
     install -d ${web_path}__/$i 
 done
 
-for i in $(find web -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' | grep -v /CVS | sed 's/^....//g'); do
-    install -m 644 web/$i ${web_path}__/$i
+for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' | sed 's/^....//g'); do
+    install -m 644 "web/$i" "${web_path}__/$i"
 done
 
-cd web
-find . -name '.htaccess' -exec install -m 644 {} ${web_path}__/{} \;
-cd - >/dev/null 2>&1
-
 if [ $players_n -eq 5 ]; then
    send_time=250
 else