Skip to content

Commit

Permalink
Merge remote-tracking branch 'tobi-github/bugfix'
Browse files Browse the repository at this point in the history
* tobi-github/bugfix:
  bee-remove: first check if $basedir is empty, then check if needed by other package
  • Loading branch information
mariux committed Aug 16, 2011
2 parents 8d1fa5f + 54febf3 commit 1693776
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 1693776

Please sign in to comment.