WinGit: Remove reference to cpio, as it does not exist anymore
[msysgit/mtrensch.git] / share / WinGit / copy-files.sh
blobae19f70a54331a4c8f335cadf6efc6812cbf7c53
1 #!/bin/sh
3 test -z "$1" && {
4 echo "Usage: $0 <dir>"
5 exit 1
8 test -d /doc/git/html/.git || { echo "Error: html pages in /doc/git/html/.git missing"; exit 1; }
10 if [ "$( cd /doc/git/html/ ; git config core.autocrlf )" != "true" ]
11 then
12 echo "Error: documentation must be checked out with core.autocrlf=true."
13 echo "Hint: fix this by"
14 echo " cd /doc/git/html"
15 echo " git config core.autocrlf true"
16 echo " rm *.html *.txt howto"
17 echo " git checkout -f"
18 exit 1
21 TMPDIR=$1
23 (test ! -d "$TMPDIR" || echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
24 mkdir "$TMPDIR" &&
25 cd "$TMPDIR" &&
26 echo "Copying files" &&
27 (git --git-dir=/doc/git/html/.git log --pretty=format:%s -1 HEAD &&
28 mkdir -p doc/git/html && cd doc/git/html &&
29 git --git-dir=/doc/git/html/.git archive HEAD | tar xf -) &&
30 (cd / && tar cf - bin/{git*,awk,basename.exe,bash.exe,bunzip2,bzip2.exe,\
31 cat.exe,chmod.exe,clear,cmp.exe,cp.exe,cut.exe,cvs.exe,date.exe,diff.exe,\
32 du.exe,echo,egrep,env.exe,expr.exe,false.exe,find.exe,gawk.exe,grep.exe,\
33 gunzip,gzip.exe,head.exe,id.exe,less.exe,libW11.dll,libperl.dll,ln.exe,\
34 ls.exe,md5sum.exe,mkdir.exe,msys-1.0.dll,msysltdl-3.dll,mv.exe,patch.exe,\
35 patch.exe.manifest,perl.exe,printf,ps.exe,pwd,rm.exe,rmdir.exe,rxvt.exe,\
36 scp.exe,sed.exe,sh.exe,sleep.exe,sort.exe,split.exe,ssh-agent.exe,ssh.exe,\
37 tail.exe,tar.exe,tee.exe,touch.exe,tr.exe,true.exe,uname.exe,uniq.exe,vi,\
38 vim.exe,wc.exe,which,xargs.exe,ssh-add.exe,start} cmd/ lib/perl5/ share/git* share/vim) |
39 tar xf - &&
40 mkdir lib/perl5/site_perl &&
41 cp /lib/{Error.pm,Git.pm} lib/perl5/site_perl/ &&
42 gitmd5=$(md5sum bin/git.exe | cut -c 1-32) &&
43 mkdir etc &&
44 md5sum bin/git-*.exe | sed -n "s/^$gitmd5 \\*//p" > etc/fileList-builtins.txt &&
45 rm $(cat etc/fileList-builtins.txt) &&
46 (cd /mingw && tar cf - bin/*{tcl,tk,wish,gpg,curl.exe,libcurl,libiconv}* \
47 lib/*{tcl,tk}* libexec/gnupg/) |
48 tar xf - &&
49 strip bin/{[a-fh-z],g[a-oq-z]}*.exe &&
50 cp /git/contrib/completion/git-completion.bash etc/ &&
51 cp /etc/termcap etc/ &&
52 cp /etc/gitconfig etc/ &&
53 cp /share/WinGit/ReleaseNotes.rtf . &&
54 sed 's/^\. .*\(git-completion.bash\)/. \/etc\/\1/' \
55 < /etc/profile > etc/profile &&
56 cp /share/resources/git.ico etc/ ||
57 exit 1