[PATCH] email: fix switch to dash check
Artem Bityutskiy
dedekind1 at gmail.com
Wed Mar 19 10:16:46 PDT 2014
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?
--
Best Regards,
Artem Bityutskiy
More information about the aiaiai
mailing list