[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool nits
From: |
Ralf Wildenhues |
Subject: |
Re: gnulib-tool nits |
Date: |
Sun, 1 Jul 2007 13:02:08 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Bruno,
* Bruno Haible wrote on Sun, Jul 01, 2007 at 12:43:33PM CEST:
>
> Yes. Your findings and my and Eric's comments [1][2][3] are giving enough
> hints how a portable and efficient solution can look like, I think?
OK thanks. I installed this.
Cheers,
Ralf
2007-07-01 Bruno Haible <address@hidden>
Eric Blake <address@hidden>
Ralf Wildenhues <address@hidden>
* gnulib-tool (self_abspathname): Fix algorithm to cope with
empty components in $PATH, denoting '.'.
Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.242
diff -u -r1.242 gnulib-tool
--- gnulib-tool 1 Jul 2007 07:55:35 -0000 1.242
+++ gnulib-tool 1 Jul 2007 10:57:21 -0000
@@ -888,9 +888,15 @@
*/*) self_abspathname=`pwd`/"$0" ;;
*)
self_abspathname=
+ pathx=$PATH
+ case :$PATH: in
+ *::*)
+ pathx=`echo ":$PATH:" | sed -e 's/:::*/:.:/g' -e 's/^://' -e 's/:\$//'`
+ ;;
+ esac
save_IFS=$IFS
IFS=:
- for d in $PATH; do
+ for d in $pathx; do
IFS=$save_IFS
test -z "$d" && d=.
if test -x "$d/$0" && test ! -d "$d/$0"; then