stow_funcs.sh: check for rw perms in {dest,master}dir.
--HG-- extra : convert_revision : fa9d0464480adef1ffd1e14c5a53cd1b96b5acd8
This commit is contained in:
parent
cf4103ec73
commit
b80643802a
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue