forward-porting default_config build option
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Feb 2007 01:00:23 +0000 (01:00 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Feb 2007 01:00:23 +0000 (01:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6972 dcc99617-32d9-48b4-a31d-7c20da2025e4

Makefile
config.sh

index fbb6bc0..2996d44 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,9 @@ verbose:      oldconfig
 config:        
        @./config.sh
 
+default_config:        
+       @./config.sh default
+
 oldconfig:     install.conf
 
 install.conf:  
index 350abaa..bffd162 100755 (executable)
--- a/config.sh
+++ b/config.sh
@@ -24,6 +24,7 @@
 
 CONFIG_FILE="install.conf";
 DEFAULT_CONFIG_FILE="install.conf.default";
+USE_DEFAULT="$1";
 
 function buildConfig {
 
@@ -35,6 +36,12 @@ function buildConfig {
                fi;
        fi;
 
+    if [ -n "$USE_DEFAULT" ]; then
+        prompt "Default config requested, not prompting for values...\n";
+        writeConfig;
+        return 0;
+    fi;
+
 
        echo "";
        echo "-----------------------------------------------------------------------";
@@ -109,7 +116,7 @@ function buildConfig {
        writeConfig;
 }
 
-function prompt { echo ""; echo -n "$*"; }
+function prompt { echo ""; echo -en "$*"; }
 
 function writeConfig {