Strip trailing slashes from directory paths if necessary.
authorZac Medico <zmedico@gentoo.org>
Wed, 19 Mar 2008 11:34:10 +0000 (11:34 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 19 Mar 2008 11:34:10 +0000 (11:34 -0000)
svn path=/main/trunk/; revision=9487

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