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:36:21 UTC
svn commit: r607368 - /httpd/httpd/branches/2.2.x/build/installwinconf.awk
Author: wrowe
Date: Fri Dec 28 19:36:20 2007
New Revision: 607368
URL: http://svn.apache.org/viewvc?rev=607368&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.
Backport: r607367
Modified:
httpd/httpd/branches/2.2.x/build/installwinconf.awk
Modified: httpd/httpd/branches/2.2.x/build/installwinconf.awk
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/build/installwinconf.awk?rev=607368&r1=607367&r2=607368&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/build/installwinconf.awk (original)
+++ httpd/httpd/branches/2.2.x/build/installwinconf.awk Fri Dec 28 19:36:20 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;
@@ -167,7 +175,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 );