summaryrefslogtreecommitdiffstats
path: root/build/installwinconf.awk
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-12-29 04:35:19 +0100
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-12-29 04:35:19 +0100
commit537a9a221eaa2f8183daddc2fa6ffa12329c43cf (patch)
tree3c8293c371bf694e7dd219f2a0151b02bd85476e /build/installwinconf.awk
parentWin32 doesn't like \t# (diff)
downloadapache2-537a9a221eaa2f8183daddc2fa6ffa12329c43cf.tar.xz
apache2-537a9a221eaa2f8183daddc2fa6ffa12329c43cf.zip
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
Diffstat (limited to 'build/installwinconf.awk')
-rw-r--r--build/installwinconf.awk11
1 files changed, 10 insertions, 1 deletions
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 );