clean: remove enabled topics before cleaning dead links
This commit is contained in:
parent
e8dac9ea19
commit
8a26dcacc1
10
clean
10
clean
|
@ -22,6 +22,12 @@ while getopts du opt; do
|
||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
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
|
shopt -s nullglob
|
||||||
links=( $HOME/.* $HOME/.*/* )
|
links=( $HOME/.* $HOME/.*/* )
|
||||||
for link in ${links[@]}; do
|
for link in ${links[@]}; do
|
||||||
|
@ -30,8 +36,4 @@ for link in ${links[@]}; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $uninstall ]]; then
|
|
||||||
_run rm -v "$(cd $(dirname $0) && pwd -P)"/.enabled.d/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vim:set ft=sh:
|
# vim:set ft=sh:
|
||||||
|
|
Loading…
Reference in a new issue