backup cleaner added to setup
This commit is contained in:
parent
b09fa8617c
commit
736755f329
16
setup
16
setup
@ -168,6 +168,20 @@ function CONFIG__SETUP() {
|
||||
### RUN CONFIG #################################################################
|
||||
################################################################################
|
||||
|
||||
function CLEAN_BACKUP() {
|
||||
read -p "Clean backup files? [yN] : " yn;
|
||||
|
||||
case $yn in
|
||||
[Yy]* )
|
||||
echo 'cleaning backup files';
|
||||
for file in $(find "$HOME/.config/" -name \*.bak); do rm $file; done
|
||||
for file in $(find "$HOME" -name .\*.bak); do rm $file; done
|
||||
;;
|
||||
* ) echo 'skipping cleanup';;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
[ ! -d "$HOME/.config" ] && mkdir "$HOME/.config";
|
||||
[ ! -d "$HOME/.config/wryn" ] && mkdir "$HOME/.config/wryn";
|
||||
|
||||
@ -175,4 +189,6 @@ SHELL__SETUP;
|
||||
VIM__SETUP;
|
||||
CONFIG__SETUP;
|
||||
|
||||
CLEAN_BACKUP;
|
||||
|
||||
echo -e "\nsetup complete"
|
||||
|
Loading…
Reference in New Issue
Block a user