You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/12/19 02:08:42 UTC

svn commit: r605378 - /incubator/stdcxx/trunk/bin/genxviews

Author: sebor
Date: Tue Dec 18 17:08:40 2007
New Revision: 605378

URL: http://svn.apache.org/viewvc?rev=605378&view=rev
Log:
2007-12-18  Martin Sebor  <se...@roguewave.com>

	* genxviews (myname, myrev, myurl): Corrected to use the $HeadURL
	keyword instead of hardcoding the (incorrect!) name of the script.

Modified:
    incubator/stdcxx/trunk/bin/genxviews

Modified: incubator/stdcxx/trunk/bin/genxviews
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/bin/genxviews?rev=605378&r1=605377&r2=605378&view=diff
==============================================================================
--- incubator/stdcxx/trunk/bin/genxviews (original)
+++ incubator/stdcxx/trunk/bin/genxviews Tue Dec 18 17:08:40 2007
@@ -1,4 +1,4 @@
-#!/usr/local/bin/bash
+#!/bin/bash
 #
 # $Id: genxviews 601595 2007-12-06 01:33:50Z sebor $
 #
@@ -22,19 +22,25 @@
 #
 ########################################################################
 
-# set program name (used in diagnostic messages)
-readonly myname=`basename $0`
+# extract the script's revision number
+myrev='$Revision$'
+myrev=${myrev#'$Revision: '}   # strip leading text
+myrev=${myrev%' $'}            # strip trailing text
 
-# URL to the trunk of the source repository
-readonly svnpath="http://svn.apache.org/viewvc/incubator/stdcxx/trunk/"
+# form the URL to this version of the script in the repository
+myurl='$HeadURL: https://svn.apache.org/repos/asf/incubator/stdcxx/trunk/bin/genxviews $'
+myurl=${myurl#'$HeadURL: '}   # strip leading text
+myurl=${myurl##*asf/}         # strip svn prefix
+myurl=${myurl%' $'}           # strip trailing text
 
-# script's revision number
-myrev='$Revision$'
-myrev=${myrev#'$Revision: '}
-myrev=${myrev%' $'}
+# prepend ViewVC prefix
+myurl="http://svn.apache.org/viewvc/$myurl"
+
+# extract program name from the url (used in diagnostic messages)
+readonly myname=${myurl##*/}
+
+myurl="$myurl?view=markup&rev=$myrev"
 
-# URL to this version of the script in the repository
-readonly myurl="$svnpath/bin/xbuildgen?view=markup&rev=$myrev"
 
 # program to invoke to process detailed results
 CROSS=$HOME/stdcxx/bin/xbuildgen