[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: A tiny improvement of the dirname emulation
From: |
Ralf Wildenhues |
Subject: |
FYI: A tiny improvement of the dirname emulation |
Date: |
Tue, 25 Apr 2006 22:13:41 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Hi Stepan,
* Stepan Kasal wrote on Tue, Apr 25, 2006 at 09:41:53AM CEST:
> Hello,
> Autoconf has recently added a tiny optimization to the expr
> implementation of dirname. I think that the copy in lib/install-sh
> could be synchronised. Patch attached.
Thanks, I have applied this, as below. (Let's sync it back to Autoconf
when we're through with the other install-sh issue.)
Cheers,
Ralf
2006-04-25 Stepan Kasal <address@hidden>
* lib/install-sh: Simplify the expr implementation of dirname.
Index: lib/install-sh
===================================================================
RCS file: /cvs/automake/automake/lib/install-sh,v
retrieving revision 1.31
diff -u -r1.31 install-sh
--- lib/install-sh 24 Apr 2006 19:58:47 -0000 1.31
+++ lib/install-sh 25 Apr 2006 20:12:51 -0000
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2006-04-24.12
+scriptversion=2006-04-25.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -238,8 +238,7 @@
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/