+sed -i "s@var \+xhr_rd_cookiepath \+= \+\"[^\"]*\";@var xhr_rd_cookiepath = \"$cookie_path\";@g" ${web_path}__/xhr.js
+sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$cookie_path\";@g" ${web_path}__/commons.js
+
+if [ -d ${web_path} ]; then
+ mv ${web_path} ${web_path}.old
+fi
+
+if [ -d ../brisk-img ]; then
+ cd ../brisk-img
+ ./INSTALL.sh -w ${web_path}__
+ cd - >/dev/null 2>&1
+fi
+
+# config file installation or diff
+if [ -f "$etc_path/$brisk_conf" ]; then
+ echo "Config file $etc_path/$brisk_conf exists."
+ echo "=== Dump the diff. ==="
+ diff -u "$etc_path/$brisk_conf" "${web_path}__""/Obj/brisk.conf-templ.pho"
+ echo "=== End dump. ==="
+else
+ echo "Config file $etc_path/$brisk_conf not exists."
+ echo "Install a template."
+ cp "${web_path}__""/Obj/brisk.conf-templ.pho" "$etc_path/$brisk_conf"
+fi
+
+mv ${web_path}__ ${web_path}
+if [ -d ${web_path}.old ]; then
+ rm -rf ${web_path}.old
+fi
+if [ "$web_only" = "FALSE" ]; then
+ mv "$ftokk_path" "$ftok_path"
+fi