Author: sebor Date: Fri Mar 21 14:22:08 2008 New Revision: 639851 URL: http://svn.apache.org/viewvc?rev=639851&view=rev Log: 2008-03-21 Martin Sebor * bin/xbuildgen: Corrected how Bash is invoked to prevent infinite recursion and preserve parameter quoting. Changed output subdirectory for .html files to builds/. * bin/genxviews: Same. Added the -V option (version) and removed -q (quiet mode). Modified: stdcxx/trunk/bin/genxviews stdcxx/trunk/bin/xbuildgen Modified: stdcxx/trunk/bin/genxviews URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/genxviews?rev=639851&r1=639850&r2=639851&view=diff ============================================================================== --- stdcxx/trunk/bin/genxviews (original) +++ stdcxx/trunk/bin/genxviews Fri Mar 21 14:22:08 2008 @@ -22,16 +22,25 @@ # ######################################################################## -if [ "$BASH_VERSION" = "" ]; then +if [ "$BASH" = "" ]; then # this is not Bash; try to invoke it if [ -x /usr/local/bin/bash ]; then - exec /usr/local/bin/bash $* + /usr/local/bin/bash $0 "$@" + exit $? fi fi +# show the command line to invoke xbuildgen without actually +# invoking the script +dryrun=0 + +# write verbose progress output to stdout? +verbose=0 + + # process command line options -while getopts "dqvD:o:" opt_name; do +while getopts "dvD:o:V:" opt_name; do case $opt_name in # options with no arguments @@ -39,10 +48,6 @@ dryrun=1 ;; - q) # quiet mode - quiet=1 - ;; - v) # verbose mode verbose=1 ;; @@ -74,7 +79,7 @@ # set output directory unless already set on the command line if [ "$outdir" = "" ]; then - outdir="$HOME/public_html/stdcxx/results" + outdir="$HOME/public_html/stdcxx/results/builds" fi else # Subversion (sub)directory under stdcxx/ @@ -82,10 +87,15 @@ # set output directory unless already set on the command line if [ "$outdir" = "" ]; then - outdir="$HOME/public_html/stdcxx-$version/results" + outdir="$HOME/public_html/stdcxx-$version/results/builds" fi + + verarg="-V$version" fi +# program to invoke to process detailed results +CROSS=$HOME/stdcxx/bin/xbuildgen + # extract the script's revision number myrev='$Revision$' @@ -107,18 +117,9 @@ myurl="$myurl?view=markup&rev=$myrev" -# program to invoke to process detailed results -CROSS=$HOME/stdcxx/bin/xbuildgen - -# show the command line to invoke xbuildgen without actually -# invoking the script -dryrun=0 - -# enable quiet mode? -quiet=0 - -# write verbose progress output to stdout? -verbose=0 +if [ $verbose -ne 0 ]; then + echo "$myname: using output directory: \"$outdir\"" +fi ###################################################################### @@ -146,14 +147,12 @@ start_time=`LC_ALL=C date` -cd $outdir - +cd $outdir/.. -if [ $quiet -eq 0 ]; then - readonly scripturl="$myname" +readonly scripturl="$myname" - cat<