Remove separator as a script, put as a function
This commit is contained in:
parent
b22ac207d6
commit
623aa5bb7a
3 changed files with 29 additions and 45 deletions
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
## This script is used to visually separate commands in the other scripts
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -n "${GREEN}"
|
||||
else
|
||||
echo -n "${RED}"
|
||||
fi
|
||||
echo "========================================"
|
||||
echo "${NC}"
|
|
@ -24,8 +24,6 @@ else
|
|||
echo "Nothing changed.${NC}"
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Add colors {{{
|
||||
|
@ -38,8 +36,6 @@ for color_file in $color_files; do
|
|||
ln -rs "$BASE_DIR"/dotfiles/vim_colors/"$color_file" ~/.vim/colors/ 2> /dev/null
|
||||
done
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Install or update Vundle {{{
|
||||
|
@ -63,8 +59,6 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Update Vundle plugins {{{
|
||||
|
@ -86,8 +80,6 @@ if [ "$UPDATE" = 'true' ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Setup git-submodules for python-mode {{{
|
||||
|
@ -103,8 +95,6 @@ if [ -e ~/.vim/bundle/python-mode ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Install linters {{{
|
||||
|
@ -142,8 +132,6 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Install YouCompleteMe {{{
|
||||
|
@ -171,8 +159,6 @@ else
|
|||
echo "YouCompleteMe is already installed, skipping..."
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
# Add YouCompleteMe extra conf files {{{
|
||||
|
@ -182,8 +168,6 @@ echo "Adding YouCompleteMe extra_conf files..."
|
|||
ln -rs "$BASE_DIR"/dotfiles/ycm_extra_conf.py ~/.ycm_extra_conf.py 2> /dev/null
|
||||
ln -rs "$BASE_DIR"/dotfiles/global_extra_conf.py ~/.global_extra_conf.py 2> /dev/null
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
|
||||
# }}}
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -13,6 +13,17 @@ export GREEN
|
|||
export ORANGE
|
||||
export NC
|
||||
|
||||
separator() {
|
||||
exit_status=$?
|
||||
if [ $exit_status -eq 0 ]; then
|
||||
echo -n "${GREEN}"
|
||||
else
|
||||
echo -n "${RED}"
|
||||
fi
|
||||
echo "========================================"
|
||||
echo "${NC}"
|
||||
}
|
||||
|
||||
BASE_DIR="$PWD"
|
||||
export BASE_DIR
|
||||
|
||||
|
@ -91,7 +102,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -101,7 +112,7 @@ echo "Setting up configuration for Vim"
|
|||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/vim_update.sh
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -111,36 +122,36 @@ echo "Configuring ProtonVPN..."
|
|||
|
||||
sudo protonvpn init && sudo protonvpn c --cc CH
|
||||
|
||||
/bin/bash "$BASE_DIR"/installation_scripts/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
# Update .bashrc {{{
|
||||
|
||||
echo "Updating .bashrc..."
|
||||
if cp ~/SetupCockpit/dotfiles/bashrc ~/.bashrc; then
|
||||
echo "${GREEN}Successfully updated .bashrc${NC}"
|
||||
else
|
||||
echo "${ORANGE}There was a problem while updating .bashrc${NC}"
|
||||
|
||||
if [ ! -L ~/.bashrc ]; then
|
||||
ln -rs "$BASE_DIR"/dotfiles/bashrc ~/.bashrc 2> /dev/null
|
||||
fi
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
# Update .bash_aliases {{{
|
||||
|
||||
echo "Updating .bash_aliases..."
|
||||
if cp ~/SetupCockpit/dotfiles/bash_aliases ~/.bash_aliases; then
|
||||
echo "${GREEN}Successfully updated .bash_aliases${NC}"
|
||||
else
|
||||
echo "${ORANGE}There was a problem while updating .bash_aliases${NC}"
|
||||
|
||||
if [ ! -L ~/.bash_aliases ]; then
|
||||
ln -rs "$BASE_DIR"/dotfiles/bash_aliases ~/.bash_aliases 2> /dev/null
|
||||
fi
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
exit
|
||||
|
||||
# Configure Git {{{
|
||||
|
||||
echo "Configuring Git..."
|
||||
|
@ -151,7 +162,7 @@ git config --global alias.co "checkout"
|
|||
git config --global alias.st "status"
|
||||
git config --global alias.br "branch"
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -169,7 +180,7 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -184,7 +195,7 @@ else
|
|||
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
|
||||
fi
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -204,7 +215,7 @@ echo "<?xml version=\"1.0\"?>
|
|||
</mime-info>" > ~/.local/share/mime/packages/text-markdown.xml
|
||||
fi
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -214,6 +225,6 @@ echo "Cloning projects..."
|
|||
|
||||
/bin/bash clone_projects.sh
|
||||
|
||||
/bin/bash ~/SetupCockpit/separator.sh
|
||||
separator
|
||||
|
||||
# }}}
|
||||
|
|
Loading…
Add table
Reference in a new issue