]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: use false or : for $isdir, and simplify
authorGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 11:08:29 +0000 (18:08 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 14:06:13 +0000 (21:06 +0700)
* build-aux/ltmain.m4sh (func_mode_install): Save a string
comparison by setting $isdir to false or : and using it directly
as the first argument to if.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/ltmain.m4sh

index e2d30b0fb27f60754cecd0cf1e9d9cdabe12550b..22bb232bc5a071ac4d7638860a4acee7cb1f08a9 100644 (file)
@@ -2027,7 +2027,7 @@ func_mode_install ()
     opts=
     prev=
     install_type=
-    isdir=no
+    isdir=false
     stripme=
     no_mode=:
     for arg
@@ -2040,7 +2040,7 @@ func_mode_install ()
       fi
 
       case $arg in
-      -d) isdir=yes ;;
+      -d) isdir=: ;;
       -f)
        if $install_cp; then :; else
          prev=$arg
@@ -2105,8 +2105,8 @@ func_mode_install ()
     dest=$func_stripname_result
 
     # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test yes = "$isdir"; then
+    test -d "$dest" && isdir=:
+    if $isdir; then
       destdir=$dest
       destname=
     else