diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-04-14 07:45:14 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-04-14 07:45:14 +0000 |
commit | 26d69ff529c9168b1906ac500a50729c23771bf8 (patch) | |
tree | c8c3ac5db5650f3de4d6303b380cd41c5c482570 | |
parent | bc9dbeed5aae44d969a3a4b87318dbddbec7f4b9 (diff) | |
download | portage-26d69ff529c9168b1906ac500a50729c23771bf8.tar.gz portage-26d69ff529c9168b1906ac500a50729c23771bf8.tar.bz2 portage-26d69ff529c9168b1906ac500a50729c23771bf8.zip |
create leading directories to match behavior of other do* programs (trunk r6393:6394 and r6395:6396)
svn path=/main/branches/2.1.2/; revision=6397
-rwxr-xr-x | bin/dohard | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/dohard b/bin/dohard index ce07f11c3..dfd7bd341 100755 --- a/bin/dohard +++ b/bin/dohard @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -8,6 +8,7 @@ if [[ $# -ne 2 ]] ; then exit 1 fi -target=$1 -linkname=$2 -exec ln -f "${D}${target}" "${D}${linkname}" +destdir=${2%/*} +[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" + +exec ln -f "${D}$1" "${D}$2" |