X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=INSTALL.sh;h=a82e5307c091da8843bf6bbcecc140f2ddbedd25;hb=254c175a7e331947c69794aa7a0248caa47e32f5;hp=9864b2e369107967986537942d3769c64284ce7c;hpb=29a83e580080f589142bc8639d8a757503fd3175;p=brisk.git diff --git a/INSTALL.sh b/INSTALL.sh index 9864b2e..a82e530 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -183,6 +183,8 @@ if [ ! -z "$outconf" ]; then echo "web_only=\"$web_only\"" ) > "$outconf" fi + +max_players=$((40 + players_n * tables_n)) # # Pre-check # @@ -234,14 +236,34 @@ if [ "$web_only" = "FALSE" ]; then chmod 666 ${ftokk_path}/warrant touch ${ftokk_path}/poll chmod 666 ${ftokk_path}/poll - for i in $(seq 0 99); do - touch ${ftokk_path}/table$i - chmod 666 ${ftokk_path}/table$i - done - for i in $(seq 0 299); do + for i in $(seq 0 $max_players); do touch ${ftokk_path}/user$i chmod 666 ${ftokk_path}/user$i done + + if [ ! -d ${ftokk_path}/bin5 ]; then + mkdir ${ftokk_path}/bin5 + chmod 777 ${ftokk_path}/bin5 + fi + + for i in $(seq 0 $max_players); do + if [ ! -d ${ftokk_path}/bin5/table$i ]; then + mkdir ${ftokk_path}/bin5/table$i + fi + chmod 777 ${ftokk_path}/bin5/table$i + touch ${ftokk_path}/bin5/table$i/table + chmod 666 ${ftokk_path}/bin5/table$i/table + for e in $(seq 0 4); do + touch ${ftokk_path}/bin5/table$i/user$e + chmod 666 ${ftokk_path}/bin5/table$i/user$e + done + done + + # 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 @@ -270,7 +292,7 @@ sed -i "s/^var G_send_time *= *[0-9]\+/var G_send_time = $send_time/g" $(find ${ # .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 *( *BRISKIN5_PLAYERS_N, *[0-9]\+ *)/define(BRISKIN5_PLAYERS_N, $players_n)/g" $(find ${web_path}__ -type f -name '*.ph*' -exec grep -l 'define *( *BRISKIN5_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,[^)]*)' {} \;)