add option to clean nvim
This commit is contained in:
parent
215cb18d7a
commit
66229564f2
1 changed files with 18 additions and 2 deletions
20
setup
20
setup
|
@ -19,19 +19,22 @@ echo "Choose your adventure:
|
||||||
1. Shell/CLI stuff only
|
1. Shell/CLI stuff only
|
||||||
2. Above plus basic GUI
|
2. Above plus basic GUI
|
||||||
3. Above plus extras like steam, messengers (bloat)
|
3. Above plus extras like steam, messengers (bloat)
|
||||||
|
4. Clean neovim data (only if you have problems or still have pre-2024 setup)
|
||||||
|
|
||||||
Enter number[1-3]: "
|
Enter number: "
|
||||||
|
|
||||||
read -r input
|
read -r input
|
||||||
|
|
||||||
if ! [ "$input" -eq "$input" ] 2> /dev/null; then
|
if ! [ "$input" -eq "$input" ] 2> /dev/null; then
|
||||||
echo "Error: Not a number"
|
echo "Error: Not a number"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$input" -lt 1 ] || [ "$input" -gt 3 ]; then
|
elif [ "$input" -lt 1 ] || [ "$input" -gt 4 ]; then
|
||||||
echo "Error: Input out of range"
|
echo "Error: Input out of range"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Trigger sudo prompt before less can block password input
|
# Trigger sudo prompt before less can block password input
|
||||||
sudo echo ''
|
sudo echo ''
|
||||||
|
|
||||||
|
@ -72,6 +75,19 @@ case "$OS" in
|
||||||
git clone https://git.doordesk.net/adam/Doors.git .doors
|
git clone https://git.doordesk.net/adam/Doors.git .doors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$input" -eq 4 ]; then
|
||||||
|
echo "Killing nvim if it's running"
|
||||||
|
ka nvim
|
||||||
|
echo "Cleaning nvim..."
|
||||||
|
"$HOME"/.doors/scripts/nvim_clean
|
||||||
|
echo "Done! Run setup to refresh"
|
||||||
|
|
||||||
|
# Give less time to catch up and tell it we're done
|
||||||
|
sleep .5 && killall -s SIGINT less
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
"$HOME"/.doors/scripts/install_arch "$input"
|
"$HOME"/.doors/scripts/install_arch "$input"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Add table
Reference in a new issue