unstow: ignore rmdir messages sent to stderr.

--HG--
extra : convert_revision : 666b70cdb9b729bf7858bd91db242a2d5c05a605
This commit is contained in:
Juan RP 2008-10-27 08:44:41 +01:00
parent 40a6d63364
commit 4ee2fd5e1a
1 changed files with 8 additions and 6 deletions

14
xbps.sh
View File

@ -1438,15 +1438,17 @@ unstow_pkg()
[ ! -f .xbps-filelist ] && exit 1 [ ! -f .xbps-filelist ] && exit 1
for f in $(cat .xbps-filelist|sort -ur); do for f in $(cat .xbps-filelist|sort -ur); do
[ -f $XBPS_MASTERDIR/$f -o -h $XBPS_MASTERDIR/$f ] && \ if [ -f $XBPS_MASTERDIR/$f -o -h $XBPS_MASTERDIR/$f ]; then
rm $XBPS_MASTERDIR/$f && \ rm $XBPS_MASTERDIR/$f >/dev/null 2>&1
echo "Removing file: $f" [ $? -eq 0 ] && echo "Removing file: $f"
fi
done done
for f in $(cat .xbps-filelist|sort -ur); do for f in $(cat .xbps-filelist|sort -ur); do
[ -d $XBPS_MASTERDIR/$f ] && \ if [ -d $XBPS_MASTERDIR/$f ]; then
rmdir $XBPS_MASTERDIR/$f && \ rmdir $XBPS_MASTERDIR/$f >/dev/null 2>&1
echo "Removing directory: $f" [ $? -eq 0 ] && echo "Removing directory: $f"
fi
done done
register_pkg_handler unregister $pkgname $version register_pkg_handler unregister $pkgname $version