From 4ee2fd5e1aa1b268933c172a25f2b2256a28f91e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 27 Oct 2008 08:44:41 +0100 Subject: [PATCH] unstow: ignore rmdir messages sent to stderr. --HG-- extra : convert_revision : 666b70cdb9b729bf7858bd91db242a2d5c05a605 --- xbps.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xbps.sh b/xbps.sh index 9d196375ce8..8d50f423cb5 100755 --- a/xbps.sh +++ b/xbps.sh @@ -1438,15 +1438,17 @@ unstow_pkg() [ ! -f .xbps-filelist ] && exit 1 for f in $(cat .xbps-filelist|sort -ur); do - [ -f $XBPS_MASTERDIR/$f -o -h $XBPS_MASTERDIR/$f ] && \ - rm $XBPS_MASTERDIR/$f && \ - echo "Removing file: $f" + if [ -f $XBPS_MASTERDIR/$f -o -h $XBPS_MASTERDIR/$f ]; then + rm $XBPS_MASTERDIR/$f >/dev/null 2>&1 + [ $? -eq 0 ] && echo "Removing file: $f" + fi done for f in $(cat .xbps-filelist|sort -ur); do - [ -d $XBPS_MASTERDIR/$f ] && \ - rmdir $XBPS_MASTERDIR/$f && \ - echo "Removing directory: $f" + if [ -d $XBPS_MASTERDIR/$f ]; then + rmdir $XBPS_MASTERDIR/$f >/dev/null 2>&1 + [ $? -eq 0 ] && echo "Removing directory: $f" + fi done register_pkg_handler unregister $pkgname $version