xbps-src: improve vmove().

This commit is contained in:
Juan RP 2011-07-02 13:33:06 +02:00
parent a26dd06538
commit 6513a02ee0

View file

@ -86,13 +86,12 @@ vmove()
msg_red "vmove: 1 argument expected: <files>\n" msg_red "vmove: 1 argument expected: <files>\n"
return 1 return 1
fi fi
if [ -n "${targetdir}" -a ! -d ${DESTDIR}/${targetdir} ]; then
vmkdir ${targetdir}
fi
if [ -z "${targetdir}" ]; then if [ -z "${targetdir}" ]; then
[ ! -d ${DESTDIR} ] && install -d ${DESTDIR}
mv ${SRCPKGDESTDIR}/$files ${DESTDIR} mv ${SRCPKGDESTDIR}/$files ${DESTDIR}
else else
mv ${SRCPKGDESTIDR}/$files ${DESTDIR}/${targetdir} [ ! -d ${DESTDIR}/${targetdir} ] && vmkdir ${targetdir}
mv ${SRCPKGDESTDIR}/$files ${DESTDIR}/${targetdir}
fi fi
} }