+ touch ${ftokk_path}/main
+ chmod 666 ${ftokk_path}/main
+ touch ${ftokk_path}/challenges
+ chmod 666 ${ftokk_path}/challenges
+ touch ${ftokk_path}/hardbans
+ chmod 666 ${ftokk_path}/hardbans
+ touch ${ftokk_path}/warrant
+ chmod 666 ${ftokk_path}/warrant
+ touch ${ftokk_path}/poll
+ chmod 666 ${ftokk_path}/poll
+ 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 $((tables_n - 1))); 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
+ # 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
+
+fi
+install -d ${web_path}__
+for i in $(find web -type d | grep '/' | sed 's/^....//g'); do
+ install -d ${web_path}__/$i
+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' -o -name 'terms-of-service*' | sed 's/^....//g'); do
+ install -m 644 "web/$i" "${web_path}__/$i"
+done
+if [ "$test_add" = "TRUE" ]; then
+ for i in $(find webtest -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^........//g'); do
+ install -m 644 "webtest/$i" "${web_path}__/$i"
+ done