您的位置:首页 > 运维架构 > Shell

shell script of downloading vim plugin for Linux OS

2014-06-10 23:41 537 查看
Below shows the script:

#!/bin/bash

log() {
  printf "[%24s] --- : $1\n" "$(date +"%Y-%m-%d %H:%M:%S.%6N")"
}

log "install pathogen.vim"
test -f ~/.vim/autoload/pathogen.vim || {
  mkdir -p ~/.vim/autoload ~/.vim/bundle && \
    curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim   test $? -eq 0 || {
    log "fail."
    exit 1
  }
}
log "done"

log "install nerdtree.vim"
which git >/dev/null || {
  log "command git is not installed at all."
  exit 1
}
test -d ~/.vim/bundle/nerdtree || {
  cd ~/.vim/bundle
  git clone https://github.com/scrooloose/nerdtree.git   cd -
}
log "done"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: