$OpenBSD: patch-install-sh,v 1.2 2006/07/20 21:00:11 robert Exp $
--- install-sh.orig	Wed Nov  2 01:30:12 2005
+++ install-sh	Thu Jul 20 17:51:44 2006
@@ -213,7 +213,7 @@
   fi
 
   # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  dstdir=`echo "$dst" | sed -e 's,/$,,g' -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 
   # Make sure that the destination directory exists.
 
