Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 34186 invoked from network); 29 Dec 2007 03:35:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Dec 2007 03:35:41 -0000 Received: (qmail 33842 invoked by uid 500); 29 Dec 2007 03:35:30 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 33775 invoked by uid 500); 29 Dec 2007 03:35:30 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 33764 invoked by uid 99); 29 Dec 2007 03:35:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 19:35:30 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Dec 2007 03:35:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 49A931A984E; Fri, 28 Dec 2007 19:35:20 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r607367 - /httpd/httpd/trunk/build/installwinconf.awk Date: Sat, 29 Dec 2007 03:35:20 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071229033520.49A931A984E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 );