libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] Remove $SED from basename and dirname definitions


From: Scott James Remnant
Subject: [FYI] Remove $SED from basename and dirname definitions
Date: Thu, 12 Feb 2004 19:20:38 +0000

zsh doesn't like this.

Applied to HEAD and branch-1-5.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

diff -ruNp libtool-CVS~/ChangeLog libtool-CVS/ChangeLog
--- libtool-CVS~/ChangeLog      2004-02-12 19:07:29.000000000 +0000
+++ libtool-CVS/ChangeLog       2004-02-12 19:18:21.000000000 +0000
@@ -0,0 +1,7 @@
+2004-02-12  Scott James Remnant  <address@hidden>
+
+       * ltmain.in, libtoolize.in, commit, config/mailnotify: Remove
+       $SED from definitions of $dirname and $basename and prefix each
+       use with it instead.  Some shells (zsh) treat the expansion as
+       a single command instead of a command with arguments.
+
diff -ruNp libtool-CVS~/commit libtool-CVS/commit
--- libtool-CVS~/commit 2004-02-12 16:47:43.000000000 +0000
+++ libtool-CVS/commit  2004-02-12 19:09:18.000000000 +0000
@@ -73,8 +73,8 @@
 : ${RM="rm -f"}
 : ${SED="sed"}
 
-dirname="$SED s,/[^/]*$,,"
-basename="$SED s,^.*/,,g"
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,g"
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
@@ -84,7 +84,7 @@ basename="$SED s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $basename`
+progname=`echo "$progpath" | $SED $basename`
 PROGRAM=clcommit
 
 # Global variables:
diff -ruNp libtool-CVS~/config/mailnotify libtool-CVS/config/mailnotify
--- libtool-CVS~/config/mailnotify      2004-02-12 19:07:29.000000000 +0000
+++ libtool-CVS/config/mailnotify       2004-02-12 19:10:14.000000000 +0000
@@ -61,8 +61,8 @@
 : ${RM="rm -f"}
 : ${SED="sed"}
 
-dirname="$SED s,/[^/]*$,,"
-basename="$SED s,^.*/,,g"
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,g"
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
@@ -72,7 +72,7 @@ basename="$SED s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $basename`
+progname=`echo "$progpath" | $SED $basename`
 PROGRAM=mailnotify
 
 # Global variables:
diff -ruNp libtool-CVS~/libtoolize.in libtool-CVS/libtoolize.in
--- libtool-CVS~/libtoolize.in  2004-02-12 16:47:43.000000000 +0000
+++ libtool-CVS/libtoolize.in   2004-02-12 19:09:08.000000000 +0000
@@ -54,8 +54,8 @@
 : ${RM="rm -f"}
 : ${SED="@SED@"}
 
-dirname="$SED s,/[^/]*$,,"
-basename="$SED s,^.*/,,g"
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,g"
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
@@ -65,7 +65,7 @@ basename="$SED s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $basename`
+progname=`echo "$progpath" | $SED $basename`
 PROGRAM=libtoolize
 
 # Global variables:
@@ -244,7 +244,7 @@ func_mkdir_p ()
     while test ! -d "$my_dir"; do
       my_dirs="$my_dir $my_dirs"
       case $my_dir in */*) ;; *) break ;; esac
-      my_dir=`echo "$my_dir" | $dirname`
+      my_dir=`echo "$my_dir" | $SED $dirname`
     done
    test ! -n "$my_dirs" || $MKDIR $my_dirs
 }
@@ -258,7 +258,7 @@ func_copy ()
     my_destfile="$2"
     my_return_status=1
 
-    func_mkdir_p `echo "$my_destfile" | "$dirname`
+    func_mkdir_p `echo "$my_destfile" | $SED $dirname`
 
     $RM "$my_destfile"
     if $opt_link && $LN_S "$my_srcfile" "$my_destfile"; then
diff -ruNp libtool-CVS~/ltmain.in libtool-CVS/ltmain.in
--- libtool-CVS~/ltmain.in      2004-02-12 19:07:24.000000000 +0000
+++ libtool-CVS/ltmain.in       2004-02-12 19:09:42.000000000 +0000
@@ -25,7 +25,7 @@
 # the same distribution terms that you use for the rest of that program.
 
 
-basename="$SED s,^.*/,,g"
+basename="s,^.*/,,g"
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
@@ -35,7 +35,7 @@ basename="$SED s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $basename`
+progname=`echo "$progpath" | $SED $basename`
 modename="$progname"
 
 # Global variables:

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]