#!/bin/sh # # aegis - project change supervisor # Copyright (C) 1997-1999, 2001 Peter Miller; # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. # # MANIFEST: aegis.cgi.in # # @configure_input@ # prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ datadir=@datadir@ # architecture neutral... e.g. AEGIS_PATH if test -r $datadir/aegis.cgi.conf; then . $datadir/aegis.cgi.conf fi # architecture specific... e.g. PATH if test -r $libdir/aegis.cgi.conf; then . $libdir/aegis.cgi.conf fi extra= lang=en file=proj_list for arg in $* do case "$arg" in *\;* | -* | *=* | *@-* | *\ * ) ;; *@*) arg=`echo "$arg" | sed -e 's|@|=|'` eval "$arg" ;; -*) ;; *) extra="$extra $arg" ;; esac done Project="$project" Change="$change" test ! -z "$project" && project="--project=$project" test ! -z "$change" && change="--change=$change" if test "$file" = "rect" then exec $bindir/aerect $extra fi if test "$file" = "aedist" then test -z "$project" && exit 1 test -z "$change" && change="--baseline" $bindir/aedist --send $project $change -ndh -naa \ -o /tmp/aegis.$$.ae > /tmp/aegis.$$ 2>&1 status=$? if test $status -ne 0 then echo 'Content-Type: text/html' echo '' echo 'Error

' echo 'Error

The command' echo '
' echo $bindir/aedist --send $project $change echo '
' echo "terminated with exit status $status." echo 'The following text was produced
'
		sed 's|<|\<|g' < /tmp/aegis.$$
		echo '
' echo '
' echo 'This page was generated' date echo '' rm /tmp/aegis.$$* exit 1 fi cat /tmp/aegis.$$.ae rm /tmp/aegis.$$* exit 0 fi if test "$file" = "pre" then test -z "$project" && exit 1 test -z "$extra" && exit 1 File="$extra" if test -z "$change" then $bindir/aegis -cp -ind $project -baserel $File \ -o /tmp/aegis.$$ 2> /tmp/aegis.$$.log status=$? if test $status -ne 0 then echo 'Content-Type: text/html' echo '' echo 'Error

' echo 'Error

The command' echo '
' echo $bindir/aegis -cp -ind -baserel $project $extra echo '
' echo "terminated with exit status $status." echo 'The following text was produced
'
			sed 's|<|\<|g' < /tmp/aegis.$$.log
			echo '
' echo '
' echo 'This page was generated' date echo '' rm -f /tmp/aegis.$$ /tmp/aegis.$$.log exit 1 fi rm -f /tmp/aegis.$$.log else # the script will work out where to get the file from cmd="`$bindir/aereport -f $datadir/en/html/cp_command.rpt $File /tmp/aegis.$$ -unf $project $change 2> /tmp/aegis.$$.log`" status=$? if test $status -ne 0 then echo 'Content-Type: text/html' echo '' echo 'Error

' echo 'Error

The command' echo '
' echo $bindir/aereport -f $datadir/en/html/chan_berev.rpt $File /tmp/aegis.$$ echo '
' echo "terminated with exit status $status." echo 'The following text was produced
'
			sed 's|<|\<|g' < /tmp/aegis.$$.log
			echo '
' echo '
' echo 'This page was generated' date echo '' rm /tmp/aegis.$$.log exit 1 fi rm /tmp/aegis.$$.log eval "$cmd 2> /tmp/aegis.$$.log" status=$? if test $status -ne 0 then echo 'Content-Type: text/html' echo '' echo 'Error

' echo 'Error

The command' echo '
' echo $cmd echo '
' echo "terminated with exit status $status." echo 'The following text was produced
'
			sed 's|<|\<|g' < /tmp/aegis.$$.log
			echo '
' echo '
' echo 'This page was generated' date echo '' rm -f /tmp/aegis.$$.log /tmp/aegis.$$ exit 1 fi rm /tmp/aegis.$$.log fi echo 'Content-Type: text/html' echo '' echo '' echo "Project \"$Project\"," test ! -z "$Change" && echo "Change $Change," x=`echo $File | sed 's/</</'` echo "File $x" echo '

' echo "Project \"$Project\"," test ! -z "$Change" && echo "Change $Change," echo "
File $x" echo '

' echo '
'
	sed 's|<|\<|g' < /tmp/aegis.$$
	echo '
' echo '
' echo 'This page was generated' date echo '' rm /tmp/aegis.$$ exit 0 fi $bindir/aereport --file $datadir/$lang/html/$file.rpt \ $project $change $extra --page-width=1000 --unformatted \ > /tmp/aegis.$$ 2>&1 status=$? if test $status -ne 0 then echo 'Content-Type: text/html' echo '' echo 'Error

' echo 'Error

The command' echo '
' echo $bindir/aereport --file $datadir/$lang/html/$file.rpt $project $change $extra --page-width=1000 --unformatted echo '
' echo "terminated with exit status $status." echo 'The following text was produced
'
	sed 's|<|\<|g' < /tmp/aegis.$$
	echo '
' echo '
' echo 'This page was generated' date echo '' else cat /tmp/aegis.$$ fi rm /tmp/aegis.$$ exit 0