stow_funcs.sh: check for rw perms in {dest,master}dir.

--HG--
extra : convert_revision : fa9d0464480adef1ffd1e14c5a53cd1b96b5acd8
This commit is contained in:
Juan RP 2008-12-21 09:13:12 +01:00
parent cf4103ec73
commit b80643802a

View file

@ -35,6 +35,10 @@ stow_pkg()
[ -z "$pkg" ] && return 2
if [ ! -w $destdir -o ! -w $XBPS_MASTERDIR ]; then
msg_error "cannot stow $pkg! (permission denied)"
fi
if [ "$build_style" = "meta-template" ]; then
[ ! -d $destdir ] && mkdir -p $destdir
fi
@ -86,6 +90,10 @@ unstow_pkg()
[ -z $pkg ] && msg_error "template wasn't specified?"
if [ ! -w $XBPS_MASTERDIR ]; then
msg_error "cannot unstow $pkg! (permission denied)"
fi
if [ "$pkgname" != "$pkg" ]; then
. $XBPS_TEMPLATESDIR/$pkg.tmpl
fi