[PATCH] email: fix switch to dash check

Keller, Jacob E jacob.e.keller at intel.com
Wed Mar 19 11:03:52 PDT 2014


On Wed, 2014-03-19 at 19:16 +0200, Artem Bityutskiy wrote:
> On Tue, 2014-03-18 at 15:56 -0700, Jacob Keller wrote:
> > +prgdir="$(readlink -ev -- ${0%/*})"
> >  srcdir="$(readlink -ev -- ${0%/*}/..)"
> >  PATH="$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH"
> >  
> > @@ -20,7 +21,7 @@ message_time="yes"
> >  # This is a small trick to make sure the script is portable - check if 'dash'
> >  # is present, and if yes - use it.
> >  if can_switch_to_dash; then
> > -	exec dash -euf -- "$srcdir/$PROG" "$@"
> > +	exec dash -euf -- "$prgdir/$PROG" "$@"
> >  	exit $?
> 
> I'd changed 'srcdir' instead and removed the '..' part from there. This
> is how it is done, say in 'helpers/aiaiai-make-kernel', which also lives
> in a subdirectory. That would be consistent.
> 
> I guess we would also need to change the 'PATH=...' lines then.
> 
> The 'gerrit/aiaiai-jenkins-test-patchset' script would also need to be
> amended.
> 
> Then all the scripts would be consistent and harmonized.
> 
> What do you think?
> 

I suppose that would work. So just have to update path. This does rely
on location of scripts being consistent, but I don't think that's a huge
issue.

Thanks,
Jake


More information about the aiaiai mailing list