From bd77243ad078ab6cd55a277739d679179cebb925 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Wed, 17 Nov 2021 19:17:42 +0300 Subject: [PATCH] Add margin inside if statements --- bootstrap.sh | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index abb04b0..945e979 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -60,39 +60,33 @@ fi # Install all configs if [ "$1" = "-S" ] ; then + # Create symlinks + for config in "${!configs[@]}" + do + ln -s $config ${configs[$config]} + done + # Install packer.nvim + mkdir ~/.local/share/nvim/site/pack + git clone --depth 1 https://github.com/wbthomason/packer.nvim \ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim -# Create symlinks -for config in "${!configs[@]}" -do - ln -s $config ${configs[$config]} -done - -# Install packer.nvim -mkdir ~/.local/share/nvim/site/pack -git clone --depth 1 https://github.com/wbthomason/packer.nvim \ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim - -# Install vim plugins -nvim -c "PackerInstall" - -if [[ ! -d "$bashCompletionsDir" ]] ; then - __install_bash_completions -fi + # Install vim plugins + nvim -c "PackerInstall" + if [[ ! -d "$bashCompletionsDir" ]] ; then + __install_bash_completions + fi fi # Remove all configs if [ "$1" = "-R" ] ; then + for config in "${!configs[@]}" + do + rm -rf ${configs[$config]} + done -cd $HOME -for config in "${!configs[@]}" -do - rm -rf ${configs[$config]} -done - -rm -rf "$bashCompletionsDir" - + rm -rf "$bashCompletionsDir" fi