Skip to content
Snippets Groups Projects
Commit 38c80348 authored by zhangxuantong@ihep.ac.cn's avatar zhangxuantong@ihep.ac.cn
Browse files

change name from vimrc_base to base.vimrc

parent 7835cf87
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment