|
|
@ -31,13 +31,11 @@ BGreen='\033[1;32m' # Green |
|
|
|
BYellow='\033[1;33m' # Yellow |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Doom Nvim version |
|
|
|
DoomNvimVersion='1.2.0' |
|
|
|
DoomNvimVersion='1.2.1' |
|
|
|
# System OS |
|
|
|
System="$(uname -s)" |
|
|
|
|
|
|
|
|
|
|
|
# Terminal Output |
|
|
|
# =============== |
|
|
|
# {{{ |
|
|
@ -54,7 +52,7 @@ log_info() { |
|
|
|
} |
|
|
|
|
|
|
|
log_error() { |
|
|
|
log "${Red}[X]${Color_reset} ${1}${2}" |
|
|
|
log "${Red}[×]${Color_reset} ${1}${2}" |
|
|
|
exit 1 |
|
|
|
} |
|
|
|
|
|
|
@ -67,7 +65,6 @@ pretty_echo () { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Check requirements |
|
|
|
# ================== |
|
|
|
# {{{ |
|
|
@ -114,13 +111,6 @@ check_requirements() { |
|
|
|
log_warn "Check requirements : nvim" |
|
|
|
fi |
|
|
|
|
|
|
|
# Check if lua is installed again |
|
|
|
if hash "lua" &> /dev/null; then |
|
|
|
log_success "Check requirements : lua" |
|
|
|
else |
|
|
|
log_warn "Check requirements : lua" |
|
|
|
fi |
|
|
|
|
|
|
|
# Check if nodejs and npm are installed again, |
|
|
|
# we do not check only nodejs because some Linux distributions |
|
|
|
# installs nodejs but not also npm |
|
|
@ -137,7 +127,6 @@ check_requirements() { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Neovim backup and installation of Doom Nvim |
|
|
|
# =========================================== |
|
|
|
# {{{ |
|
|
@ -159,7 +148,6 @@ backup_neovim() { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Doom Nvim updating |
|
|
|
# ================== |
|
|
|
# {{{ |
|
|
@ -168,13 +156,13 @@ update_repo(){ |
|
|
|
log_info "Updating doom-nvim ..." |
|
|
|
|
|
|
|
cd "$HOME/.config/doom-nvim" |
|
|
|
git pull origin develop-nightly |
|
|
|
git pull # origin develop-nightly |
|
|
|
cd - >/dev/null 2>&1 |
|
|
|
|
|
|
|
log_success "Successfully updated doom-nvim, more demons were released in your terminal!" |
|
|
|
else |
|
|
|
log_info "Trying to clone doom-nvim ..." |
|
|
|
git clone -q -b develop-nightly https://github.com/NTBBloodbath/doom-nvim "$HOME/.config/doom-nvim" |
|
|
|
git clone -q -b "$1" https://github.com/NTBBloodbath/doom-nvim "$HOME/.config/doom-nvim" |
|
|
|
if [ $? -eq 0 ]; then |
|
|
|
log_success "Successfully cloned doom-nvim, some demons were released in your terminal!" |
|
|
|
else |
|
|
@ -231,7 +219,7 @@ install_fonts() { |
|
|
|
|
|
|
|
download_font() { |
|
|
|
# Download patched Nerd Fonts |
|
|
|
url="https://raw.githubusercontent.com/ryanoasis/nerd-fonts/patched-fonts/FiraCode/Regular/complete${1// /%20}" |
|
|
|
url="https://github.com/ryanoasis/nerd-fonts/raw/2.1.0/patched-fonts/FiraCode/Regular/complete/${1// /%20}" |
|
|
|
download_path="$HOME/.local/share/fonts/$1" |
|
|
|
if [[ -f "$download_path" && ! -s "$download_path" ]]; then |
|
|
|
rm "$download_path" |
|
|
@ -241,7 +229,7 @@ download_font() { |
|
|
|
log_success "Downloaded $1" |
|
|
|
else |
|
|
|
log_info "Downloading $1 ..." |
|
|
|
curl -s -o "$download_path" "$url" |
|
|
|
curl -sLo "$download_path" "$url" |
|
|
|
log_success "Downloaded $1" |
|
|
|
fi |
|
|
|
} |
|
|
@ -258,7 +246,6 @@ install_done() { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Uninstall Doom Nvim |
|
|
|
# =================== |
|
|
|
# {{{ |
|
|
@ -281,7 +268,6 @@ uninstall() { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Init banner |
|
|
|
# =========== |
|
|
|
# {{{ |
|
|
@ -310,7 +296,6 @@ welcome() { |
|
|
|
} |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
# Helper and execution |
|
|
|
# ==================== |
|
|
|
# {{{ |
|
|
@ -323,6 +308,7 @@ helper() { |
|
|
|
pretty_echo ${Yellow} " -h --help Displays this message" |
|
|
|
pretty_echo ${Yellow} " -c --check-requirements Check Doom Nvim requirements" |
|
|
|
pretty_echo ${Yellow} " -i --install Install Doom Nvim" |
|
|
|
pretty_echo ${Yellow} " -d --install-dev Install Development version of Doom Nvim" |
|
|
|
pretty_echo ${Yellow} " -n --nightly Install Neovim Nightly and Doom Nvim" |
|
|
|
pretty_echo ${Yellow} " -u --update Update Doom Nvim" |
|
|
|
pretty_echo ${Yellow} " -v --version Echo Doom Nvim version" |
|
|
@ -330,8 +316,7 @@ helper() { |
|
|
|
} |
|
|
|
|
|
|
|
main() { |
|
|
|
if [ $# -gt 0 ] |
|
|
|
then |
|
|
|
if [ $# -gt 0 ]; then |
|
|
|
case $1 in |
|
|
|
--check-requirements | -c) |
|
|
|
welcome |
|
|
@ -346,7 +331,19 @@ main() { |
|
|
|
--install | -i) |
|
|
|
welcome |
|
|
|
check_all |
|
|
|
update_repo |
|
|
|
update_repo "main" |
|
|
|
install_packer |
|
|
|
install_fonts |
|
|
|
backup_neovim |
|
|
|
install_done |
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
--install-dev | -d) |
|
|
|
welcome |
|
|
|
check_all |
|
|
|
update_repo "develop-nightly" |
|
|
|
install_packer |
|
|
|
install_fonts |
|
|
|
backup_neovim |
|
|
|
install_done |
|
|
|
exit 0 |
|
|
@ -354,7 +351,7 @@ main() { |
|
|
|
--nvim-nightly | -n) |
|
|
|
welcome |
|
|
|
check_all |
|
|
|
update_repo |
|
|
|
update_repo "main" |
|
|
|
backup_neovim |
|
|
|
install_nvim_nightly |
|
|
|
install_done |
|
|
@ -380,7 +377,7 @@ main() { |
|
|
|
# Run normal commands |
|
|
|
welcome |
|
|
|
check_all |
|
|
|
update_repo |
|
|
|
update_repo "main" |
|
|
|
backup_neovim |
|
|
|
install_packer |
|
|
|
install_fonts |
|
|
|