Git installer: add file syntax/nosyntax.vim for Vim
[msysgit.git] / share / WinGit / copy-files.sh
blob10e25d515a04f38bab44b698f39e121a79a93613
1 #!/bin/sh
3 test -z "$1" && {
4 echo "Usage: $0 <dir>"
5 exit 1
8 test -d /doc/git/html/.git ||
9 (cd / && git submodule update --init doc/git/html) || {
10 echo "Error: html pages in /doc/git/html/.git missing"
11 exit 1
14 if test "$( cd /doc/git/html/ ; git config core.autocrlf )" != "true"
15 then
16 echo "Error: documentation must be checked out with core.autocrlf=true."
17 echo "If you have changes in the documentation, hit Ctrl-C NOW."
18 sleep 3
19 (cd /doc/git/html &&
20 git config core.autocrlf true &&
21 rm -rf *.html *.txt howto &&
22 git checkout -f) || {
23 echo "Could not fix documentation"
24 exit 1
28 TMPDIR=$1
30 (test ! -d "$TMPDIR" || echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
31 mkdir "$TMPDIR" &&
32 cd "$TMPDIR" &&
33 echo "Copying files" &&
34 (git --git-dir=/doc/git/html/.git log --pretty=format:%s -1 HEAD &&
35 mkdir -p doc/git/html && cd doc/git/html &&
36 git --git-dir=/doc/git/html/.git archive HEAD | tar xf -) &&
37 (cd / && tar cf - \
38 $(ls {bin,libexec/git-core}/git* | grep -v 'cvs\|send-email\|shell\|archimport\|instaweb') \
39 bin/{awk,basename.exe,bash.exe,bunzip2,bzip2.exe,c_rehash,\
40 cat.exe,chmod.exe,clear,cmp.exe,cp.exe,cut.exe,cvs.exe,date.exe,diff.exe,\
41 du.exe,echo,egrep,env.exe,expr.exe,false.exe,find.exe,gawk.exe,grep.exe,\
42 gunzip,gzip.exe,head.exe,id.exe,kill.exe,less.exe,libW11.dll,ln.exe,\
43 ls.exe,md5sum.exe,mkdir.exe,msys-1.0.dll,msysltdl-3.dll,mv.exe,patch.exe,\
44 patch.exe.manifest,perl.exe,printf,ps.exe,pwd,rm.exe,rmdir.exe,rxvt.exe,\
45 scp.exe,sed.exe,sh.exe,sleep.exe,sort.exe,split.exe,\
46 ssh-agent.exe,ssh.exe,ssh-add.exe,ssh-keygen.exe,ssh-keyscan.exe,\
47 tail.exe,tar.exe,tee.exe,touch.exe,tr.exe,true.exe,uname.exe,uniq.exe,vi,\
48 msys-perl5_8.dll,lib{apr,aprutil,expat,neon,z,svn}*.dll,pthreadGC2.dll,\
49 msys-crypto-0.9.8.dll,msys-ssl-0.9.8.dll,msys-minires.dll,msys-z.dll,\
50 openssl.exe,vim,wc.exe,which,xargs.exe,start} lib/engines/ \
51 ssl/ cmd/ lib/perl5/ share/git* \
52 share/vim/vimrc share/vim/vim72/{filetype.vim,ftoff.vim,menu.vim,optwin.vim,\
53 scripts.vim,\
54 autoload/netrw.vim,autoload/netrwFileHandlers.vim,autoload/netrwSettings.vim,\
55 plugin/netrwPlugin.vim,\
56 syntax/c.vim,syntax/conf.vim,syntax/cpp.vim,syntax/diff.vim,\
57 syntax/gitcommit.vim,\
58 syntax/nosyntax.vim,syntax/syncolor.vim,syntax/synload.vim,syntax/syntax.vim,\
59 vim.exe}) |
60 tar xf - &&
61 rm -rf bin/cvs.exe &&
62 (test ! -f /lib/Git.pm || cp -u /lib/Git.pm lib/perl5/site_perl/Git.pm) &&
63 test -f lib/perl5/site_perl/Git.pm &&
64 gitmd5=$(md5sum bin/git.exe | cut -c 1-32) &&
65 mkdir etc &&
66 if test -z "$DONT_REMOVE_BUILTINS"
67 then
68 md5sum {bin,libexec/git-core}/git-*.exe |
69 sed -n "s/^$gitmd5 \\*//p" > etc/fileList-builtins.txt &&
70 rm $(cat etc/fileList-builtins.txt)
71 fi &&
72 (cd /mingw && tar cf - bin/*{tcl,tk,wish,gpg,curl.exe,libcurl,libiconv}* \
73 lib/*{tcl,tk}* libexec/gnupg/) |
74 tar xf - &&
75 strip bin/{[a-fh-z],g[a-oq-z]}*.exe libexec/git-core/*.exe &&
76 cp /git/contrib/completion/git-completion.bash etc/ &&
77 cp /etc/termcap etc/ &&
78 cp /etc/inputrc etc/ &&
79 cp /etc/gitconfig etc/ &&
80 cp /share/WinGit/ReleaseNotes.rtf . &&
81 sed 's/^\. .*\(git-completion.bash\)/. \/etc\/\1/' \
82 < /etc/profile > etc/profile &&
83 cp /share/resources/git.ico etc/ ||
84 exit 1