From: William A. Rowe Jr Date: Sat, 29 Dec 2007 03:35:19 +0000 (+0000) Subject: Believe this or not, not every machine uses "C:\Documents and Settings", X-Git-Tag: 2.3.0~1090 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=537a9a221eaa2f8183daddc2fa6ffa12329c43cf;p=apache 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 --- 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 );