diff --git a/bootstrap.sh b/bootstrap.sh index 6a83d6264fe18856fb145615404fdcfbd5958fd8..0c3e2233b753942db60ef87eaf2b418f88037273 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -43,8 +43,8 @@ function setDocker(){ function setVim(){ # for git and wsl echo -e "\e[32mConfiguring Vim...\e[0m" - yes | cp -f $PWD/src/vimrc_base ~/.env/vimrc_base &>/dev/null - if ! grep "source ~/.env/vimrc_base" ~/.vimrc &>/dev/null; then echo -e "source ~/.env/vimrc_base" >> ~/.vimrc; fi + yes | cp -f $PWD/src/base.vimrc ~/.env/base.vimrc &>/dev/null + if ! grep "source ~/.env/base.vimrc" ~/.vimrc &>/dev/null; then echo -e "source ~/.env/base.vimrc" >> ~/.vimrc; fi if [[ ! -f ~/.vim/autoload/plug.vim ]]; then wget -q -P ~/.vim/autoload/ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim diff --git a/bootstrap_remote.sh b/bootstrap_remote.sh index 938c73b40793850aeba8c474044811171f62d2d6..4bc71fbc1505244cab93b65d1050051e4e84099f 100755 --- a/bootstrap_remote.sh +++ b/bootstrap_remote.sh @@ -19,26 +19,31 @@ command2="cd ~; \ source ./install.sh;" command3="yum upgrade --noplugins -y" -case $1 in - monitor) - remote_command=$command2 - ;; - firewall) - ./tools/firewall-update.sh $host_list - exit - ;; - update) - remote_command=$command3 - ;; - --help) - --help - exit - ;; - *) - ./tools/firewall-update.sh $host_list - remote_command=$command1 - ;; -esac +if [ -z "$1" ]; then + ./tools/firewall-update.sh $host_list + remote_command=$command1 +else + case $1 in + monitor) + remote_command=$command2 + ;; + firewall) + ./tools/firewall-update.sh $host_list + exit + ;; + update) + remote_command=$command3 + ;; + --help) + --help + exit + ;; + *) + remote_command=$1 + echo -e "Executing \e[31m$remote_command\e[0m ..." + ;; + esac +fi for remote_host in $(cat src/hostlist.txt); do if [[ "${remote_host:0:1}" != "#" ]]; then diff --git a/src/vimrc_base b/src/base.vimrc similarity index 100% rename from src/vimrc_base rename to src/base.vimrc