vim_mainline and vim_extended are discontinued
[vim_extended.git] / update-vim-messages.sh
blobb0ea5bc9b606fda18b1ee9d90b5c422c14fcc6c0
1 #!/bin/sh
3 # by Markus Heidelberg, 2008
5 # Fetch the current message 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 src/po/ contains untracked files
28 test -z "$(git ls-files --others -- src/po)" ||
29 die "Working tree contains untracked files in src/po/"
31 rsync -avzcP --delete \
32 ftp.nluug.nl::Vim/messages/ src/po
34 git add --all -- src/po
36 git commit -m"update message files" &&
37 # show changes
38 { git show --stat --summary -p
39 # look for garbage
40 git status ; }