summaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 850e46f1f726d2910d02267e590d8b7daf770077 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

set -e

DIRS="
  syntax indent ftplugin ftdetect autoload compiler doc
  after/syntax after/indent
"

copy_dir() {
  if [ -d "tmp/$1" ]; then
    mkdir -p "$1"
    cp -r tmp/$1/* $1/
  fi
}

# Fetches syntax files from given Github repo
syntax() {
  echo "$1..."
  rm -rf tmp
  git clone -q --recursive "https://github.com/$1.git" tmp
  which tree && tree tmp

  for dir in $DIRS; do
    copy_dir "$dir"
  done
}

rm -rf $DIRS

# syntax 'vim-ruby/vim-ruby'