mirror of
https://github.com/Lissy93/dotfiles.git
synced 2024-11-26 01:03:25 +01:00
Prompt user before updating ZSH, Vim and Tmux plugins
This commit is contained in:
parent
9f2253755d
commit
dea5e5a8c2
@ -186,7 +186,7 @@ function setup_dot_files () {
|
|||||||
cd "${DOTFILES_DIR}"
|
cd "${DOTFILES_DIR}"
|
||||||
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
|
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
|
||||||
git submodule update --init --recursive "${DOTBOT_DIR}"
|
git submodule update --init --recursive "${DOTBOT_DIR}"
|
||||||
chmod +x dotbot/bin/dotbot
|
chmod +x lib/dotbot/bin/dotbot
|
||||||
"${DOTFILES_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${DOTFILES_DIR}" -c "${SYMLINK_FILE}" "${@}"
|
"${DOTFILES_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${DOTFILES_DIR}" -c "${SYMLINK_FILE}" "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ function apply_preferences () {
|
|||||||
|
|
||||||
# If ZSH not the default shell, ask user if they'd like to set it
|
# If ZSH not the default shell, ask user if they'd like to set it
|
||||||
if [[ $SHELL != *"zsh"* ]] && command_exists zsh; then
|
if [[ $SHELL != *"zsh"* ]] && command_exists zsh; then
|
||||||
echo "\n${CYAN_B}Would you like to set ZSH as your default shell? (y/N)${RESET}"
|
echo -e "\n${CYAN_B}Would you like to set ZSH as your default shell? (y/N)${RESET}"
|
||||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_zsh
|
read -t $PROMPT_TIMEOUT -n 1 -r ans_zsh
|
||||||
if [[ $ans_zsh =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
if [[ $ans_zsh =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||||
echo -e "${PURPLE}Setting ZSH as default shell${RESET}"
|
echo -e "${PURPLE}Setting ZSH as default shell${RESET}"
|
||||||
@ -203,6 +203,10 @@ function apply_preferences () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prompt user to update ZSH, Tmux and Vim plugins, then reload each
|
||||||
|
echo -e "\n${CYAN_B}Would you like to install / update ZSH, Tmux and Vim plugins? (y/N)${RESET}"
|
||||||
|
read -t $PROMPT_TIMEOUT -n 1 -r ans_cliplugins
|
||||||
|
if [[ $ans_cliplugins =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||||
# Install / update vim plugins with Plug
|
# Install / update vim plugins with Plug
|
||||||
echo -e "\n${PURPLE}Installing Vim Plugins${RESET}"
|
echo -e "\n${PURPLE}Installing Vim Plugins${RESET}"
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall
|
||||||
@ -216,6 +220,7 @@ function apply_preferences () {
|
|||||||
# Install / update ZSH plugins with Antigen
|
# Install / update ZSH plugins with Antigen
|
||||||
echo -e "${PURPLE}Installing ZSH Plugins${RESET}"
|
echo -e "${PURPLE}Installing ZSH Plugins${RESET}"
|
||||||
/bin/zsh -i -c "antigen update && antigen-apply"
|
/bin/zsh -i -c "antigen update && antigen-apply"
|
||||||
|
fi
|
||||||
|
|
||||||
# Apply general system, app and OS security preferences (prompt user first)
|
# Apply general system, app and OS security preferences (prompt user first)
|
||||||
echo -e "${CYAN_B}Would you like to apply system preferences? (y/N)${RESET}"
|
echo -e "${CYAN_B}Would you like to apply system preferences? (y/N)${RESET}"
|
||||||
|
Loading…
Reference in New Issue
Block a user