initial "report class" xml and schema generator script
[Evergreen.git] / config.sh
index 542f9df..4e5b6b4 100755 (executable)
--- a/config.sh
+++ b/config.sh
@@ -27,16 +27,6 @@ DEFAULT_CONFIG_FILE="install.conf.default";
 
 function buildConfig {
 
-#      if [ -f "$CONFIG_FILE" ]; then
-#              echo "";
-#              echo "Using existing config file \"$CONFIG_FILE\""; 
-#              echo "To generate a new config, remove \"$CONFIG_FILE\"";
-#              echo "";
-#              sleep 3;        
-#              exit 0;
-#      fi
-
-
        if [ -f "$DEFAULT_CONFIG_FILE" ]; then
                source "$DEFAULT_CONFIG_FILE";
        fi;
@@ -47,9 +37,6 @@ function buildConfig {
        echo "Type Enter to select the default"
        echo "-----------------------------------------------------------------------";
 
-       prompt "Temporary files directory [$TMP] "
-       read X; if [ ! -z "$X" ]; then TMP="$X"; fi;
-
        prompt "Install prefix [$PREFIX] ";
        read X; if [ ! -z "$X" ]; then PREFIX="$X"; fi
 
@@ -57,38 +44,22 @@ function buildConfig {
        LIBDIR="$PREFIX/lib/";
        PERLDIR="$LIBDIR/perl5/";
        INCLUDEDIR="$PREFIX/include/";
-       WEBDIR="$PREFIX/web";
-       CGIDIR="$PREFIX/cgi-bin";
-       ETCDIR="$PREFIX/etc";
-       TEMPLATEDIR="$PREFIX/templates";
-       CIRCRULESDIR="$PREFIX/circ";
-
-       prompt "Executables directory [$BINDIR] "
-       read X; if [ ! -z "$X" ]; then BINDIR="$X"; fi;
-
-       prompt "Lib directory [$LIBDIR] "
-       read X; if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
-
-       prompt "Perl directory [$PERLDIR] "
-       read X; if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
+       ETCDIR="$PREFIX/conf";
+       WEBDIR="$PREFIX/var/web";
+       CGIDIR="$PREFIX/var/cgi-bin";
+       TEMPLATEDIR="$PREFIX/var/templates";
+       CIRCRULESDIR="$PREFIX/var/circ";
+       XSLDIR="$PREFIX/var/xsl";
+       TMP="$(pwd)/.tmp";
 
-       prompt "Include files directory [$INCLUDEDIR] "
-       read X; if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
+       prompt "Web domain for OPAC in Staff Client [$NEW_OPAC_URL] "
+       read X; if [ ! -z "$X" ]; then NEW_OPAC_URL="$X"; fi;
 
-       prompt "Config files directory [$ETCDIR] "
-       read X; if [ ! -z "$X" ]; then ETCDIR="$X"; fi;
+       prompt "Package Name for Staff Client [$NEW_XUL_PACKAGE_NAME] "
+       read X; if [ ! -z "$X" ]; then NEW_XUL_PACKAGE_NAME="$X"; fi;
 
-       prompt "Web Root Directory [$WEBDIR] "
-       read X; if [ ! -z "$X" ]; then WEBDIR="$X"; fi;
-
-       prompt "Web CGI Directory [$CGIDIR] "
-       read X; if [ ! -z "$X" ]; then CGIDIR="$X"; fi;
-
-       prompt "Templates directory [$TEMPLATEDIR] "
-       read X; if [ ! -z "$X" ]; then TEMPLATEDIR="$X"; fi;
-
-       prompt "Custom circulation rules directory [$CIRCRULESDIR] "
-       read X; if [ ! -z "$X" ]; then CIRCRULESDIR="$X"; fi;
+       prompt "Package Label for Staff Client [$NEW_XUL_PACKAGE_LABEL] "
+       read X; if [ ! -z "$X" ]; then NEW_XUL_PACKAGE_LABEL="$X"; fi;
 
        prompt "Apache2 apxs binary [$APXS2] "
        read X; if [ ! -z "$X" ]; then APXS2="$X"; fi;
@@ -142,6 +113,11 @@ function writeConfig {
        _write "TEMPLATEDIR=\"$TEMPLATEDIR\"";
        _write "ETCDIR=\"$ETCDIR\"";
        _write "CIRCRULESDIR=\"$CIRCRULESDIR\"";
+       _write "XSLDIR=\"$XSLDIR\"";
+
+       _write "NEW_OPAC_URL=\"$NEW_OPAC_URL\"";
+       _write "NEW_XUL_PACKAGE_NAME=\"$NEW_XUL_PACKAGE_NAME\"";
+       _write "NEW_XUL_PACKAGE_LABEL=\"$NEW_XUL_PACKAGE_LABEL\"";
 
        # print out the targets
        STR="TARGETS=(";
@@ -166,7 +142,6 @@ function writeConfig {
        _write "DBPW=\"$DBPW\"";
 
 
-
        # Now we'll write out the DB bootstrapping config
        CONFIG_FILE='Open-ILS/src/cgi-bin/setup.pl';
        rm -f "$CONFIG_FILE";
@@ -204,6 +179,8 @@ function writeConfig {
 
        prompt "To write a new config, run 'make config'";
        prompt "";
+       prompt "To edit individual install locations (e.g. changing the lib directory),"
+       prompt "edit the install.conf file generated from this script"
 
 }