ispman configure,1.8,1.9
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30799
Modified Files:
configure
Log Message:
code reformatting by perltidy conforming perl style guide
Index: configure
===================================================================
RCS file: /cvsroot/ispman/ispman/configure,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- configure 2 Sep 2003 00:25:28 -0000 1.8
+++ configure 30 May 2004 23:35:29 -0000 1.9
@@ -1,59 +1,55 @@
#!/usr/bin/perl
+
use File::Path;
use Getopt::Long;
-GetOptions (
-'prefix=s' => \$prefix,
-'help' => \&help) || help();
-
+GetOptions(
+ 'prefix=s' => \$prefix,
+ 'help' => \&help
+ )
+ || help();
-if (-e "tmp/conf/ispman.conf") {
- if (!$prefix) {
- require "tmp/conf/ispman.conf";
- $prefix=$ISPMan::Config->{'installDir'};
- }
+if ( -e "tmp/conf/ispman.conf" ) {
+ if ( !$prefix ) {
+ require "tmp/conf/ispman.conf";
+ $prefix = $ISPMan::Config->{'installDir'};
+ }
}
-$prefix||="/opt/ispman";
-
+$prefix ||= "/opt/ispman";
-
sub help {
-print qq|
+ print qq|
Installation layout options:
--prefix=PREFIX install allfiles under this PREFIX[/opt/ispman]
|;
exit;
}
-
print "Setting $prefix as PREFIX\n";
print "Everything will be installed under $prefix\n";
-
-open F , "< makedefs";
[email protected]=<F>;
+open F, "< makedefs";
[email protected] = <F>;
close(F);
-
open F, "> makedefs";
-my $seen_ispman_install_path=0;
- for (@lines) {
- if (/ISPMAN_INSTALL_PATH/) {
- $seen_ispman_install_path=1;
- print F "ISPMAN_INSTALL_PATH=$prefix\n";
- } else {
- print F "$_";
- }
+my $seen_ispman_install_path = 0;
+for (@lines) {
+ if (/ISPMAN_INSTALL_PATH/) {
+ $seen_ispman_install_path = 1;
+ print F "ISPMAN_INSTALL_PATH=$prefix\n";
+ }
+ else {
+ print F "$_";
+ }
}
-print F "ISPMAN_INSTALL_PATH=$prefix\n" unless $seen_ispman_install_path;
-close ("F");
-
-
+print F "ISPMAN_INSTALL_PATH=$prefix\n" unless $seen_ispman_install_path;
+close("F");
-unless (-e "build") {
- print "Creating a build directory for you. build/\n";
- system("mkdir build");
+unless ( -e "build" ) {
+ print "Creating a build directory for you. build/\n";
+ system("mkdir build");
}
mkpath("build/htdocs/admin");
@@ -70,12 +66,11 @@
#system( "find ./build -type f | xargs perl -pi -e 's!%%installDir%%!$prefix!g'" );
#system( "perl -pi -e 's!/opt/ispman/lib!$prefix/lib!g' build/cgi-bin/*.cgi");
-mkpath ("tmp/conf");
+mkpath("tmp/conf");
open F, ">>tmp/conf/ispman.conf";
print F "\$ISPMan::Config->{'installDir'}='$prefix';\n1;\n";
-close ("F");
-
+close("F");
print "Now please run make\n";
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click