From: erickson Date: Mon, 15 Oct 2007 15:50:12 +0000 (+0000) Subject: added logic to update the offline-config.pl script when "make config" is run so it... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6c12fc1ee4272882c15cb6e8a5f0c6fbcdddfc9b;p=Evergreen.git added logic to update the offline-config.pl script when "make config" is run so it will not have to be manually created git-svn-id: svn://svn.open-ils.org/ILS/trunk@7885 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 "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";