From 537a9a221eaa2f8183daddc2fa6ffa12329c43cf Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sat, 29 Dec 2007 03:35:19 +0000 Subject: Believe this or not, not every machine uses "C:\Documents and Settings", split off the current user's name from USERPROFILE envvar. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607367 13f79535-47bb-0310-9956-ffa450edef68 --- build/installwinconf.awk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build/installwinconf.awk') diff --git a/build/installwinconf.awk b/build/installwinconf.awk index f373a214fe..b33da6f208 100644 --- a/build/installwinconf.awk +++ b/build/installwinconf.awk @@ -38,6 +38,14 @@ BEGIN { 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 @@ BEGIN { } 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 ); -- cgit v1.2.3