stow_funcs.sh: fix previous for root(!).

--HG--
extra : convert_revision : 618c758ee199429cdc67eb66f9fb6fa2d7972f94
This commit is contained in:
Juan RP 2008-12-21 09:16:55 +01:00
parent b80643802a
commit ddc026a5ff

View File

@ -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