config differentiated from master
[brisk.git] / INSTALL.sh
index df595c9..f95cf91 100755 (executable)
@@ -3,12 +3,15 @@
 #
 # Defaults
 #
-CONFIG_FILE="$HOME/.brisk_install"
+CONFIG_FILE="$HOME/.brisk_spu_install"
+
+apache_path="/etc/apache2/sites-available/"
+apache_conf="default"
 
 players_n=3
 tables_n=44
 tables_auth_n=12
-brisk_auth_conf="brisk_auth.conf.pho"
+brisk_auth_conf="brisk_spu_auth.conf.pho"
 brisk_debug="0x0400"
 # brisk_debug="0xffff"
 web_path="/home/nastasi/web/brisk"
@@ -16,7 +19,7 @@ ftok_path="/home/nastasi/brisk-priv/ftok/brisk"
 proxy_path="/home/nastasi/brisk-priv/proxy/brisk"
 legal_path="/home/nastasi/brisk-priv/brisk"
 cookie_path="/brisk/"
-brisk_conf="brisk.conf.pho"
+brisk_conf="brisk_spu.conf.pho"
 web_only="FALSE"
 
 
@@ -280,6 +283,7 @@ done
 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
+chmod 755 "${web_path}__/spush/brisk-spush.php"
 
 if [ $players_n -eq 5 ]; then
    send_time=250
@@ -293,11 +297,11 @@ sed -i "s/PLAYERS_N *= *[0-9]\+/PLAYERS_N = $players_n/g" $(find ${web_path}__ -
 sed -i "s/^var G_send_time *= *[0-9]\+/var G_send_time = $send_time/g" $(find ${web_path}__ -type f -name '*.js' -exec grep -l '^var G_send_time *= *[0-9]\+' {} \;)
 
 # .ph[pho] substitutions
-sed -i "s/define *( *'PLAYERS_N', *[0-9]\+ *)/define('PLAYERS_N', $players_n)/g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l 'define *( *'PLAYERS_N', *[0-9]\+ *)' {} \;)
+sed -i "s/define *( *'PLAYERS_N', *[0-9]\+ *)/define('PLAYERS_N', $players_n)/g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l "define *( *'PLAYERS_N', *[0-9]\+ *)" {} \;)
 
-sed -i "s/define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)/define('BIN5_PLAYERS_N', $players_n)/g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l 'define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)' {} \;)
+sed -i "s/define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)/define('BIN5_PLAYERS_N', $players_n)/g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l "define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)" {} \;)
 
-sed -i "s@define *( *'FTOK_PATH',[^)]*)@define('FTOK_PATH', \"$ftok_path\")@g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l 'define *( *'FTOK_PATH',[^)]*)' {} \;)
+sed -i "s@define *( *'FTOK_PATH',[^)]*)@define('FTOK_PATH', \"$ftok_path\")@g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l "define *( *'FTOK_PATH',[^)]*)" {} \;)
 
 sed -i "s@define *( *'TABLES_N',[^)]*)@define('TABLES_N', $tables_n)@g" ${web_path}__/Obj/brisk.phh