From 819cb9d4b925a68a220466945ce4441337ce9b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 6 Apr 2025 20:04:20 +0200 Subject: [PATCH] feat: add install function --- .zshrc.d/install_dotfiles.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .zshrc.d/install_dotfiles.zsh diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh new file mode 100644 index 0000000..91ae7b6 --- /dev/null +++ b/.zshrc.d/install_dotfiles.zsh @@ -0,0 +1,22 @@ +install_dotfiles () { + echo "Installing stuff..." + # vim-plug + if ! [[ -f ~/.local/share/nvim/site/autoload/plug.vim ]]; then + echo "Dotfiles: Downloading vim-plug..." + if curl \ + --fail \ + --location \ + --retry 5 \ + --retry-delay 1 \ + --create-dirs \ + --progress-bar \ + --output ~/.local/share/nvim/site/autoload/plug.vim \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + then + echo "Dotfiles: Done" + else + echo "Dotfiles: Error downloading vim-plug" + dotfiles_install_error="yes" + fi + fi +}