Subject: Re: review wanted: su/cvs return code checking (resend)
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 12/02/2003 18:49:15
On Fri, Nov 28, 2003 at 11:56:25PM +0100, Hubert Feyrer wrote:
> On Thu, 27 Nov 2003, Alistair Crooks wrote:
> > How about (not tried):
> >
> > 	if ${ID} ${CVS_USER} > /dev/null 2>&1; then			\
> > 		su - ${CVS_USER} -c 'stty sane ; setenv CVS_RSH ssh ; cd '${USR_PKGSRC}' ; cvs -q update -Pd '"${CVS_FLAGS}"' || exit 0'; \
> > 		if [ $? != 0 ]; then					\
> > 			...						\
> > 		fi;							\
> > 	else								\
> > 		echo "*** $${CVS_USER} (${CVS_USER}) does not exist ***" 2>&1; \
> > 		exit 1;							\
> > 	fi
> 
> Um, pre-build is a /bin/sh script, not a Makefile. ;)

Um, the code fragment above is written in sh(1).  Well, except for
the csh setenv part which was used verbatim.

> I've committed the change as proposed for a start, we can still discuss
> details if needed.

Pity - why bother sending the code out for review, then?

Regards,
Alistair
--
Alistair Crooks <agc@pkgsrc.org>