8 test -d doc
/git
/html
/.git ||
9 (git submodule update
--init doc
/git
/html
/) ||
{
10 echo "Error: html pages in /doc/git/html/ missing"
14 if test "$( cd doc/git/html/ ; git config core.autocrlf )" != "true"
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."
20 git config core.autocrlf true
&&
21 rm -rf *.html
*.txt howto
&&
23 echo "Could not fix documentation"
28 SCRIPTDIR
="$(cd "$
(dirname "$0")" && pwd)"
29 MSYSGITROOT
="$(cd $SCRIPTDIR/../../ && pwd | sed 's/\/$//')/."
32 (test ! -d "$TMPDIR" ||
echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
35 echo "Copying files" &&
36 (git
--git-dir=$MSYSGITROOT/doc
/git
/html
/.git log
--pretty=format
:%s
-1 HEAD
&&
37 mkdir
-p doc
/git
/html
&& cd doc
/git
/html
&&
38 git
--git-dir=$MSYSGITROOT/doc
/git
/html
/.git archive HEAD |
tar xf
-) &&
39 (cd $MSYSGITROOT && tar cf
- \
40 $
(ls {bin
,libexec
/git-core
}/git
* |
grep -v 'cvs\|shell\|archimport\|instaweb') \
41 bin
/{antiword.exe
,docx2txt
,astextplain
,awk,basename.exe
,bash.exe
,bison.exe
,yacc,\
42 bunzip2
,bzip2.exe
,c_rehash
,\
43 cat.exe
,chmod.exe
,clear,cmp.exe
,cp.exe
,cut.exe
,cvs.exe
,date.exe
,diff.exe
,\
45 du.exe
,echo,egrep,env.exe
,expr.exe
,false.exe
,find.exe
,flex.exe
,gawk.exe
,grep.exe
,\
46 head.exe
,id.exe
,kill.exe
,less.exe
,libW11.dll
,ln.exe
,\
47 ls.exe
,m4.exe
,md5sum.exe
,mkdir.exe
,msys-1.0.dll
,msysltdl-3.dll
,mv.exe
,patch.exe
,\
48 patch.exe.manifest
,perl.exe
,printf,ps.exe
,pwd,recodetree
,rm.exe
,rmdir.exe
,rxvt.exe
,\
49 scp.exe
,sed.exe
,sh.exe
,sleep.exe
,sort.exe
,split.exe
,\
50 ssh-agent.exe
,ssh.exe
,ssh-add.exe
,ssh-keygen.exe
,ssh-keyscan.exe
,\
51 tail.exe
,tar.exe
,tee.exe
,touch.exe
,tr.exe
,true.exe
,uname.exe
,uniq.exe
,\
53 msys-perl5_8.dll
,lib
{apr
,aprutil
,expat
,neon
,z
,svn
}*.dll
,pthreadGC2.dll
,\
54 msys-crypto-0.9
.8.dll
,msys-regex-1.dll
,msys-ssl-0.9
.8.dll
,msys-minires.dll
,msys-z.dll
,\
55 vim
,wc.exe
,which,xargs.exe
,start
} lib
/engines
/ \
56 ssl
/ cmd
/ lib
/perl
5/ libexec
/git-core
/mergetools
share
/antiword
/ share
/bison
/ share
/git
* \
57 share
/vim
/vimrc
share
/vim
/vim74
/{filetype.vim
,ftoff.vim
,menu.vim
,optwin.vim
,\
59 autoload
/netrw.vim
,autoload
/netrwFileHandlers.vim
,autoload
/netrwSettings.vim
,\
60 plugin
/netrwPlugin.vim
,\
61 syntax
/c.vim
,syntax
/conf.vim
,syntax
/cpp.vim
,syntax
/diff.vim
,\
62 syntax
/gitcommit.vim
,syntax
/gitconfig.vim
,syntax
/gitrebase.vim
,syntax
/git.vim
,\
63 syntax
/nosyntax.vim
,syntax
/syncolor.vim
,syntax
/synload.vim
,syntax
/syntax.vim
,\
67 (test ! -f $MSYSGITROOT/lib
/Git.pm ||
cp -u $MSYSGITROOT/lib
/Git.pm lib
/perl
5/site_perl
/Git.pm
) &&
68 (test ! -d $MSYSGITROOT/lib
/Git ||
cp -uR $MSYSGITROOT/lib
/Git lib
/perl
5/site_perl
/Git
) &&
69 test -f lib
/perl
5/site_perl
/Git.pm
&&
70 gitmd5
=$
(md5sum bin
/git.exe | cut
-c 1-32) &&
72 md5sum {bin
,libexec
/git-core
}/git-
*.exe libexec
/git-core
/git.exe |
73 sed -n -r "s/^$gitmd5\s+\*?(.*)/\1/p" > etc
/fileList-builtins.txt
&&
74 rm $
(cat etc
/fileList-builtins.txt
) && # rm builtins - if needed we'll restore them after strip
75 (cd $MSYSGITROOT/mingw
&& tar cf
- \
76 bin
/*{tcl
,tk
,wish
,gpg
,msmtp
,curl.exe
,*.crt
}* bin
/connect.exe bin
/iconv.exe \
77 bin
/dos2unix.exe bin
/unix2dos.exe bin
/hd2u.exe bin
/openssl.exe \
78 bin
/*{libcurl
,libcrypto
,libssl
,libgsasl
,libiconv
,libintl
}* \
79 bin
/getcp.exe bin
/rebase.exe \
80 bin
/gzip.exe bin
/gunzip.exe \
81 bin
/{libpoppler-7.dll
,pdfinfo.exe
,pdftotext.exe
} \
82 lib
/{tcl
,tk
,dde
,reg
}* ) |
84 strip bin
/{[a-fh-z
],g
[a-oq-z
]}*.exe libexec
/git-core
/*.exe
&&
85 if test -n "$DONT_REMOVE_BUILTINS"
87 # restore builtins after git.exe was stripped
88 # (for PE, strip embeds current time into file header, and if we just
89 # pass all git builtins to strip the result will be lots of
90 # not-bit-exact exe's)
91 for b
in $
(cat etc
/fileList-builtins.txt
); do
95 cp $MSYSGITROOT/git
/contrib
/completion
/git-completion.bash etc
/ &&
96 cp $MSYSGITROOT/git
/contrib
/completion
/git-prompt.sh etc
/ &&
97 cp $MSYSGITROOT/etc
/termcap etc
/ &&
98 cp $MSYSGITROOT/etc
/inputrc etc
/ &&
99 sed 's/ = \/mingw\// = \//' < $MSYSGITROOT/etc
/gitconfig
> etc
/gitconfig
&&
100 cp $MSYSGITROOT/etc
/gitattributes etc
/ &&
101 cp $MSYSGITROOT/share
/WinGit
/Git\ Bash.vbs .
&&
103 cp $MSYSGITROOT/src
/git-cheetah
/explorer
/git_shell_ext.dll git-cheetah
/ &&
104 cp $MSYSGITROOT/src
/git-cheetah
/explorer
/git_shell_ext64.dll git-cheetah
/ &&
105 cp $MSYSGITROOT/share
/WinGit
/ReleaseNotes.rtf .
&&
106 sed 's@/git/contrib/completion@/etc@g' \
107 < $MSYSGITROOT/etc
/profile
> etc
/profile
&&
108 cp $MSYSGITROOT/share
/resources
/git.ico etc
/ &&
109 cp $MSYSGITROOT/share
/resources
/git.ico
share
/git-gui
/lib
/git-gui.ico
&&
110 find bin libexec
-iname \
*.exe
-o -iname \
*.dll |
sort > etc
/fileList-bindimage.txt ||