clean: remove enabled topics before cleaning dead links

This commit is contained in:
Henrik Lissner 2016-12-23 18:21:40 -05:00
parent e8dac9ea19
commit 8a26dcacc1

10
clean
View file

@ -22,6 +22,12 @@ while getopts du opt; do
done
shift $((OPTIND-1))
# Remove enabled topics
if [[ $uninstall ]]; then
_run rm -v "$(cd $(dirname $0) && pwd -P)"/.enabled.d/*
fi
# Remove dead links
shopt -s nullglob
links=( $HOME/.* $HOME/.*/* )
for link in ${links[@]}; do
@ -30,8 +36,4 @@ for link in ${links[@]}; do
fi
done
if [[ $uninstall ]]; then
_run rm -v "$(cd $(dirname $0) && pwd -P)"/.enabled.d/*
fi
# vim:set ft=sh: