Skip to content

Commit

Permalink
bee-remove: first check if $basedir is empty, then check if needed by…
Browse files Browse the repository at this point in the history
… other package
  • Loading branch information
Tobias Dreyer committed Aug 16, 2011
1 parent 8d1fa5f commit 54febf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bee-remove.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ do_remove() {
if [ "${BEEMETAFORMAT}" = "2" ] ; then
dirs=$(for var in ${!PKG_*} ; do eval echo \${${var}} ; done | sort -ur)
for dir in ${dirs} ; do
if [ -d "${dir}" -a -z "$(${BEE_LIBEXECDIR}/bee/bee.d/bee-query ${dir})" ] ; then
${NOOP:+echo} rmdir ${dir}
if [ ! -d "${dir}" -o -n "$(ls -A ${dir})" -o -n "$(${BEE_LIBEXECDIR}/bee/bee.d/bee-query ${dir})" ] ; then
continue
fi
${NOOP:+echo} rmdir ${dir}
done
fi
}
Expand Down

0 comments on commit 54febf3

Please sign in to comment.