Strip trailing slashes from directory paths if necessary. (trunk r9487)
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Mar 2008 12:31:37 +0000 (12:31 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Mar 2008 12:31:37 +0000 (12:31 -0000)
svn path=/main/branches/2.1.2/; revision=9565

bin/doins

index ed0212048e22edb94b5b8e559ac05140da137289..e9404a77c382b50afe83a40164a97f2fef796e9e 100755 (executable)
--- a/bin/doins
+++ b/bin/doins
@@ -50,6 +50,9 @@ for x in "$@" ; do
                        continue
                fi
 
+               while [ "$x" != "${x%/}" ] ; do
+                       x=${x%/}
+               done
                if [ $x = "${x%/*}" ] ; then
                        pushd "$PWD" >/dev/null
                else