From: erickson Date: Tue, 11 Dec 2007 14:44:59 +0000 (+0000) Subject: backporting the "make config" offline config file creation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b40666957dc53265fd6b3b4012dba017db2d2489;p=Evergreen.git backporting the "make config" offline config file creation git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@8196 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/config.sh b/config.sh index b40845ce53..c96d8623c0 100755 --- a/config.sh +++ b/config.sh @@ -205,6 +205,32 @@ function writeConfig { _write '$main::config{index} = "config.cgi";'; + # -------------------------------------------------------------------- + # Now we'll write out the offline config + CONFIG_FILE='Open-ILS/src/offline/offline-config.pl'; + rm -f "$CONFIG_FILE"; + echo "Writing bootstrapping config to $CONFIG_FILE..."; + + _write "\$main::config{base_dir} = '$PREFIX/var/data/offline/';"; + _write "\$main::config{bootstrap} = '$ETCDIR/opensrf_core.xml';"; + + STR='$main::config{dsn} ='; + STR="$STR 'dbi:${DBDRVR}:host="; + STR="${STR}${DBHOST};dbname="; + STR="${STR}${DBNAME};port="; + STR="${STR}${DBPORT}';"; + _write "$STR" + + STR='$main::config{usr} ='; + STR="$STR '$DBUSER';"; + _write "$STR" + + STR='$main::config{pw} ='; + STR="$STR '$DBPW';"; + _write "$STR" + # -------------------------------------------------------------------- + + prompt ""; prompt ""; prompt "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";