shellnotes/util/.hidden/.resetshellnotes.sh

73 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2021-03-28 11:39:18 +02:00
:<<'info'
shellnotes - .resetshellnotes.sh
(C) Dimitris Marakomihelakis
Released under the "All rights reserved" category. See the RIGHTS.txt file
in /docs/github/ for its full text.
info
function resetshellnotes() {
2021-07-06 10:49:01 +02:00
DIR="$(pwd)"
2021-04-24 18:10:08 +02:00
proceed() {
2021-03-28 11:39:18 +02:00
echo "y\n" | clearlogs >/dev/null
echo "" > ~/.shellnotes/util/listnotes/output/*
2023-08-20 19:37:24 +02:00
echo ".shellnotes/sne/sne.py" > ~/.shellnotes/util/shellnotes/sd/sd-input1.txt
2021-07-05 10:50:01 +02:00
echo "/bin/nano"> ~/.shellnotes/util/shellnotes/sd/sd-input2.txt
echo "~/Notes" > ~/.shellnotes/util/shellnotes/sd/sd-input3.txt
2021-07-06 10:49:01 +02:00
reset="
#The first line is the user's default shell found during installation process.
#The lines below must NOT be changed.
export DIR="$(pwd)"
2023-08-20 19:37:24 +02:00
.~/.shellnotes/whatsnew.sh
2021-07-06 10:49:01 +02:00
. ~/.shellnotes/util/getv.sh
. ~/.shellnotes/def/defaults.sh
. ~/.shellnotes/util/ChMkDir.sh
. ~/.shellnotes/util/readnote.sh
. ~/.shellnotes/util/quickread.sh
. ~/.shellnotes/util/quicknote.sh
. ~/.shellnotes/util/newnote.sh
. ~/.shellnotes/util/delnote.sh
. ~/.shellnotes/util/listnotes.sh
. ~/.shellnotes/util/findnote.sh
. ~/.shellnotes/util/findmisplacednote.sh
. ~/.shellnotes/util/renamenote.sh
. ~/.shellnotes/util/notewc.sh
. ~/.shellnotes/util/notegrep.sh
2023-08-20 19:37:24 +02:00
. ~/.shellnotes/util/clipnote.sh
. ~/.shellnotes/util/rmdups.sh
2021-07-06 10:49:01 +02:00
. ~/.shellnotes/util/shellnotes.sh
. ~/.shellnotes/util/.hidden/.clearlogs.sh
. ~/.shellnotes/util/.hidden/.resetshellnotes.sh
"
echo $reset > ~/.shellnotes/.shellnotes.sh
2023-08-20 19:37:24 +02:00
# mv ~/.shellnotes/.shellnotes.sh ~/.shellnotes/shellnotes.sh
rm -rf ~/.shellnotes/**/__pycache__
echo "" > ~/.shellnotes/**/.env
2021-04-24 18:10:08 +02:00
}
case $1 in -f | --force )
proceed
cd $DIR
return 0
2021-03-28 11:39:18 +02:00
esac
2021-04-24 18:10:08 +02:00
echo "Be aware that this command will erase shellnotes' memory."
2023-08-20 19:37:24 +02:00
echo "This contains default editors and folder, logfiles, user data and cache."
2021-04-24 18:10:08 +02:00
echo "Your Notes will not be removed."
echo -n "Proceed? " && read input
case $input in y|Yes|Y|YES|yes)
proceed
echo "Done."
esac
cd $DIR
2021-03-28 11:39:18 +02:00
return 0
}