]> git.etc.gen.nz Git - spong.git/commitdiff
added code to build process to copy spong.conf-sample file to spong.conf if
authorStephen L Johnson <sjohnson@monsters.org>
Fri, 7 Jun 2002 00:35:31 +0000 (00:35 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Fri, 7 Jun 2002 00:35:31 +0000 (00:35 +0000)
it's not found in the config/ dir

build

diff --git a/build b/build
index 54fe3c8a96bcb286207c366f86ef7418bc3faa58..000b7baea5c70624a8e7ab8298eca4d5690a53b9 100755 (executable)
--- a/build
+++ b/build
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#/usr/bin/perl
 #
 # You need to change the above line to the location of Perl on your machine.
 # And yes, I realized that I am reinventing the functionality of make here - 
@@ -85,6 +85,11 @@ sub build {
    my( $os ) = @_;
    my $file;
 
+   # If spong.conf file not present, copy a know good one
+   if ( ! -f "./config/spong.conf" ) {
+      ssystem( "cp ./config/spong.conf-sample ./config/spong.conf");
+   }
+
    ssystem( "mkdir ./etc" ) if ! -d "./etc";
    ssystem( "cp ./config/spong.conf ./etc/spong.conf" );
    ssystem( "cp ./config/spong.hosts ./etc/spong.hosts" );