feat: user gets asked to install neovim config either minimal or standard
This commit is contained in:
parent
76c71e8343
commit
bfc876d91c
1 changed files with 15 additions and 12 deletions
25
install.sh
25
install.sh
|
@ -164,6 +164,11 @@ askThings() {
|
|||
echo_info "Do you also want to install optional packages? (y/n)"
|
||||
read -r askOptional </dev/tty
|
||||
|
||||
if [ ! -d "$HOME/.config/nvim" ]; then
|
||||
echo_info "Do you also want to install a neovim config? [m]inimal || [s]tandard || [n]o"
|
||||
read -r askNvim </dev/tty
|
||||
fi
|
||||
|
||||
case "$askOptional" in
|
||||
[yY]) __optional__="true" ;;
|
||||
[nN]) __optional__="false" ;;
|
||||
|
@ -172,11 +177,12 @@ askThings() {
|
|||
|
||||
cloneDots() {
|
||||
choise="$1"
|
||||
cloneName="${2:-$1}"
|
||||
|
||||
if command_exists git; then
|
||||
[ -d ./dotfiles ] &&
|
||||
[ ! -d "./dotfiles/${choise}" ] &&
|
||||
git clone --depth=1 "https://git.k4li.de/dotfiles/${choise}.git" "./dotfiles/.config/${choise}"
|
||||
git clone --depth=1 "https://git.k4li.de/dotfiles/${choise}.git" "./dotfiles/.config/${cloneName}"
|
||||
|
||||
else
|
||||
echo_error "Git was not found"
|
||||
|
@ -207,20 +213,17 @@ __validate__() {
|
|||
[kK] | kitty) cloneDots "kitty" ;;
|
||||
[aA] | alacritty) cloneDots "alacritty" ;;
|
||||
esac
|
||||
|
||||
case "$askNvim" in
|
||||
[mM] | minimal) cloneDots "nvim-mini" "nvim" ;;
|
||||
[sS] | standard) cloneDots "nvim" ;;
|
||||
[nN] | no) return 0 ;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo_error "Something went terribly wrong"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/.config/nvim" ]; then
|
||||
echo_note "There was no nvim config found, do you want to clone the pika nvim? (y/n)"
|
||||
read -r _neovim </dev/tty
|
||||
case "$_neovim" in
|
||||
[yY])
|
||||
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
__dep__() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue