Mercurial > hg > octave-kai > gnulib-hg
changeset 9023:23cafca8deb4
* gnulib-tool (self_abspathname): Fix algorithm to cope with
empty components in $PATH, denoting '.'.
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
---|---|
date | Sun, 01 Jul 2007 11:02:14 +0000 |
parents | 44509698ba9d |
children | 95dab937f368 |
files | ChangeLog gnulib-tool |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-01 Bruno Haible <bruno@clisp.org> + Eric Blake <ebb9@byu.net> + Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * gnulib-tool (self_abspathname): Fix algorithm to cope with + empty components in $PATH, denoting '.'. + 2007-07-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * gnulib-tool: Fix indentation.
--- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2007-07-01 07:55:35 $' +cvsdatestamp='$Date: 2007-07-01 11:02:15 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -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