stow_funcs.sh: fix previous for root(!).
--HG-- extra : convert_revision : 618c758ee199429cdc67eb66f9fb6fa2d7972f94
This commit is contained in:
parent
b80643802a
commit
ddc026a5ff
|
@ -35,7 +35,8 @@ stow_pkg()
|
|||
|
||||
[ -z "$pkg" ] && return 2
|
||||
|
||||
if [ ! -w $destdir -o ! -w $XBPS_MASTERDIR ]; then
|
||||
if [ $(id -u) -ne 0 ] && \
|
||||
[ ! -w $destdir -o ! -w $XBPS_MASTERDIR ]; then
|
||||
msg_error "cannot stow $pkg! (permission denied)"
|
||||
fi
|
||||
|
||||
|
@ -90,7 +91,8 @@ unstow_pkg()
|
|||
|
||||
[ -z $pkg ] && msg_error "template wasn't specified?"
|
||||
|
||||
if [ ! -w $XBPS_MASTERDIR ]; then
|
||||
if [ $(id -u) -ne 0 ] && \
|
||||
[ ! -w $XBPS_MASTERDIR ]; then
|
||||
msg_error "cannot unstow $pkg! (permission denied)"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user