Installer: Use BindImageEx to potentially speed-up loading of DLLs
[msysgit.git] / share / WinGit / copy-files.sh
blob317b0e39522684b1198c796213dc50443b8402ce
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\|shell\|archimport\|instaweb') \
39 bin/{antiword.exe,astextplain,awk,basename.exe,bash.exe,bison.exe,yacc,\
40 bunzip2,bzip2.exe,c_rehash,\
41 cat.exe,chmod.exe,clear,cmp.exe,cp.exe,cut.exe,cvs.exe,date.exe,diff.exe,\
42 dirname.exe,\
43 du.exe,echo,egrep,env.exe,expr.exe,false.exe,find.exe,flex.exe,gawk.exe,grep.exe,\
44 gunzip,gzip.exe,head.exe,id.exe,kill.exe,less.exe,libW11.dll,ln.exe,\
45 ls.exe,m4.exe,md5sum.exe,mkdir.exe,msys-1.0.dll,msysltdl-3.dll,mv.exe,patch.exe,\
46 patch.exe.manifest,perl.exe,printf,ps.exe,pwd,rm.exe,rmdir.exe,rxvt.exe,\
47 scp.exe,sed.exe,sh.exe,sleep.exe,sort.exe,split.exe,\
48 ssh-agent.exe,ssh.exe,ssh-add.exe,ssh-keygen.exe,ssh-keyscan.exe,\
49 tail.exe,tar.exe,tee.exe,touch.exe,tr.exe,true.exe,uname.exe,uniq.exe,vi,\
50 msys-perl5_8.dll,lib{apr,aprutil,expat,neon,z,svn}*.dll,pthreadGC2.dll,\
51 msys-crypto-0.9.8.dll,msys-regex-1.dll,msys-ssl-0.9.8.dll,msys-minires.dll,msys-z.dll,\
52 openssl.exe,vim,wc.exe,which,xargs.exe,start} lib/engines/ \
53 ssl/ cmd/ lib/perl5/ share/antiword/ share/bison/ share/git* \
54 share/vim/vimrc share/vim/vim73/{filetype.vim,ftoff.vim,menu.vim,optwin.vim,\
55 scripts.vim,\
56 autoload/netrw.vim,autoload/netrwFileHandlers.vim,autoload/netrwSettings.vim,\
57 plugin/netrwPlugin.vim,\
58 syntax/c.vim,syntax/conf.vim,syntax/cpp.vim,syntax/diff.vim,\
59 syntax/gitcommit.vim,syntax/gitconfig.vim,syntax/gitrebase.vim,syntax/git.vim,\
60 syntax/nosyntax.vim,syntax/syncolor.vim,syntax/synload.vim,syntax/syntax.vim,\
61 vim.exe}) |
62 tar xf - &&
63 rm -rf bin/cvs.exe &&
64 (test ! -f /lib/Git.pm || cp -u /lib/Git.pm lib/perl5/site_perl/Git.pm) &&
65 test -f lib/perl5/site_perl/Git.pm &&
66 gitmd5=$(md5sum bin/git.exe | cut -c 1-32) &&
67 mkdir etc &&
68 if test -z "$DONT_REMOVE_BUILTINS"
69 then
70 md5sum {bin,libexec/git-core}/git-*.exe libexec/git-core/git.exe |
71 sed -n "s/^$gitmd5 \\*//p" > etc/fileList-builtins.txt &&
72 rm $(cat etc/fileList-builtins.txt)
73 fi &&
74 (cd /mingw && tar cf - \
75 bin/*{tcl,tk,wish,gpg,msmtp,curl.exe,*.crt}* bin/connect.exe \
76 bin/*{libcurl,libcrypto,libssl,libgsasl,libiconv}* \
77 bin/getcp.exe bin/rebase.exe \
78 bin/{libpoppler-7.dll,pdfinfo.exe,pdftotext.exe} \
79 lib/{tcl,tk,dde,reg}* libexec/gnupg/) |
80 tar xf - &&
81 cp /mingw/bin/hd2u.exe bin/dos2unix.exe &&
82 md5sum /bin/msys-1.0.dll > etc/msys-1.0.dll.md5 &&
83 strip bin/{[a-fh-z],g[a-oq-z]}*.exe libexec/git-core/*.exe &&
84 cp /git/contrib/completion/git-completion.bash etc/ &&
85 cp /etc/termcap etc/ &&
86 cp /etc/inputrc etc/ &&
87 sed 's/ = \/mingw\// = \//' < /etc/gitconfig > etc/gitconfig &&
88 cp /etc/gitattributes etc/ &&
89 cp /share/WinGit/Git\ Bash.vbs . &&
90 mkdir git-cheetah &&
91 cp /src/git-cheetah/explorer/git_shell_ext.dll git-cheetah/ &&
92 cp /share/WinGit/ReleaseNotes.rtf . &&
93 sed 's/^\. .*\(git-completion.bash\)/. \/etc\/\1/' \
94 < /etc/profile > etc/profile &&
95 cp /share/resources/git.ico etc/ &&
96 find bin libexec -iname \*.exe -o -iname \*.dll | sort > etc/fileList-bindimage.txt ||
97 exit 1