You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/12/29 04:35:20 UTC
svn commit: r607367 - /httpd/httpd/trunk/build/installwinconf.awk
Author: wrowe
Date: Fri Dec 28 19:35:19 2007
New Revision: 607367
URL: http://svn.apache.org/viewvc?rev=607367&view=rev
Log:
Believe this or not, not every machine uses "C:\Documents and Settings",
split off the current user's name from USERPROFILE envvar.
Modified:
httpd/httpd/trunk/build/installwinconf.awk
Modified: httpd/httpd/trunk/build/installwinconf.awk
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/installwinconf.awk?rev=607367&r1=607366&r2=607367&view=diff
==============================================================================
--- httpd/httpd/trunk/build/installwinconf.awk (original)
+++ httpd/httpd/trunk/build/installwinconf.awk Fri Dec 28 19:35:19 2007
@@ -38,6 +38,14 @@
sourceroot = serverroot "/" sourceroot;
}
+ usertree = ENVIRON["USERPROFILE"]
+ if ( usertree > "" ) {
+ gsub( /\\/, "/", usertree );
+ gsub( /\/[^\/]+$/, "", usertree );
+ } else {
+ usertree = "C:/Documents and Settings";
+ }
+
print "Installing Apache HTTP 2.0 server with" >tstfl;
print " DomainName = " domainname >tstfl;
print " ServerName = " servername >tstfl;
@@ -171,7 +179,8 @@
}
gsub( /@rel_runtimedir@/, "logs" );
gsub( /@rel_sysconfdir@/, "conf" );
- gsub( /\/home\/\*\/public_html/, "\"C:/Documents and Settings/*/My Documents/My Website\"" );
+ gsub( /\/home\/\*\/public_html/, \
+ usertree "/*/My Documents/My Website" );
gsub( /UserDir public_html/, "UserDir \"My Documents/My Website\"" );
gsub( /@@ServerName@@|www.example.com/, servername );
gsub( /@@ServerAdmin@@|you@example.com/, serveradmin );