vim_mainline and vim_extended are discontinued
[vim_extended.git] / update-vim-runtime.sh
blob85349e82cb3a087d43b54f91fbf53641ae9df5cb
1 #!/bin/sh
3 # by Markus Heidelberg, 2008
5 # Fetch the current runtime files, commit them to the repository and show
6 # changes if available.
8 . "$(git --exec-path)/git-sh-setup"
9 require_work_tree
11 GIT_AUTHOR_NAME="Bram Moolenaar"
12 GIT_AUTHOR_EMAIL="Bram@moolenaar.net"
13 GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
14 GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
15 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
16 export GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
18 # rsync shouldn't overwrite own work, so the following tests
20 # test if working tree is dirty
21 git rev-parse --verify HEAD > /dev/null &&
22 git update-index --refresh &&
23 git diff-files --quiet &&
24 git diff-index --cached --quiet HEAD -- ||
25 die "Working tree is dirty"
27 # test if runtime/ contains untracked files
28 test -z "$(git ls-files --others -- runtime)" ||
29 die "Working tree contains untracked files in runtime/"
31 rsync -avzcP --delete \
32 --exclude="/dos/" \
33 --include="/spell/en.*.spl" \
34 --exclude="/spell/*.spl" \
35 --include="/spell/en.*.sug" \
36 --exclude="/spell/*.sug" \
37 ftp.nluug.nl::Vim/runtime/ runtime
39 git add --all -- runtime
41 git commit -m"update runtime files" &&
42 # show changes
43 { git show --stat --summary -p
44 # look for garbage
45 git status ; }