4 echo "Usage: $0 <version>"
8 test -d /doc
/git
/html
/.git ||
{ echo "Error: html pages in /doc/git/html/.git missing"; exit 1; }
10 TARGET
="$HOME"/WinGit-
$1.exe
11 OPTS7
="-m0=lzma -mx=9 -md=64M"
13 LIST7
=etc
/fileList.txt
16 (test ! -d "$TMPDIR" ||
echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
18 (cd "$(dirname "$0")" &&
20 mkdir
"$TMPDIR"/bin
&&
21 cp broadcast-environment-change.exe
"$TMPDIR"/bin
&&
22 cp create-shortcut.exe
"$TMPDIR"/bin
&&
23 cp uninstaller.exe
"$TMPDIR"/bin
) &&
25 echo "Copying files" &&
26 (git
--git-dir=/doc
/git
/html
/.git log
--pretty=format
:%s
-1 HEAD
&&
27 mkdir
-p doc
/git
/html
&& cd doc
/git
/html
&&
28 git
--git-dir=/doc
/git
/html
/.git archive HEAD |
tar xf
-) &&
29 (cd / && tar cf
- bin
/{git
*,awk,basename.exe
,bash.exe
,bunzip2
,bzip2.exe
,\
30 cat.exe
,chmod.exe
,clear,cmp.exe
,cp.exe
,cpio,cut.exe
,cvs.exe
,date.exe
,diff.exe
,\
31 du.exe
,echo,egrep,env.exe
,expr.exe
,false.exe
,find.exe
,gawk.exe
,grep.exe
,\
32 gunzip
,gzip.exe
,head.exe
,id.exe
,less.exe
,libW11.dll
,libperl.dll
,ln.exe
,\
33 ls.exe
,md5sum.exe
,mkdir.exe
,msys-1.0.dll
,msysltdl-3.dll
,mv.exe
,patch.exe
,\
34 patch.exe.manifest
,perl.exe
,printf,ps.exe
,pwd,rm.exe
,rmdir.exe
,rxvt.exe
,\
35 scp.exe
,sed.exe
,sh.exe
,sleep.exe
,sort.exe
,split.exe
,ssh-agent.exe
,ssh.exe
,\
36 tail.exe
,tar.exe
,tee.exe
,touch.exe
,tr.exe
,true.exe
,uname.exe
,uniq.exe
,vi
,\
37 vim.exe
,wc.exe
,which,xargs.exe
,ssh-add.exe
,start
} lib
/perl
5/ share
/git
* share
/vim
) |
39 mkdir lib
/perl
5/site_perl
&&
40 cp /lib
/{Error.pm
,Git.pm
} lib
/perl
5/site_perl
/ &&
41 gitmd5
=$
(md5sum bin
/git.exe | cut
-c 1-32) &&
43 md5sum bin
/git-
*.exe |
sed -n "s/^$gitmd5 \\*//p" > etc
/fileList-builtins.txt
&&
44 rm $
(cat etc
/fileList-builtins.txt
) &&
45 (cd /mingw
&& tar cf
- bin
/*{tcl
,tk
,wish
,gpg
,curl.exe
,libcurl
}* \
46 lib
/*{tcl
,tk
}* libexec
/gnupg
/) |
48 strip bin
/{[a-fh-z
],g
[a-oq-z
]}*.exe
&&
49 cp /git
/contrib
/completion
/git-completion.bash etc
/ &&
50 cp /etc
/termcap etc
/ &&
51 sed 's/^\. .*\(git-completion.bash\)/. \/etc\/\1/' \
52 < /etc
/profile
> etc
/profile
&&
53 cp /share
/resources
/git.ico etc
/ &&
54 sed "s/@@WINGITVERSION@@/$1/" < /share
/WinGit
/install.tcl
> bin
/install.tcl
&&
56 find * -type f |
sed "s|^\./||" > "$LIST7" &&
57 7z a
$OPTS7 $TARGET7 @
"$LIST7" ||
60 (cat /share
/7-Zip/7zSD.sfx
&&
61 echo ';!@Install@!UTF-8!' &&
62 echo 'Progress="yes"' &&
63 echo 'Title="WinGit: MinGW Git + minimal MSys installation"' &&
64 echo 'BeginPrompt="This program installs a complete Git for MSys setup"' &&
65 echo 'CancelPrompt="Do you want to cancel WinGit installation?"' &&
66 echo 'ExtractDialogText="Please, wait..."' &&
67 echo 'ExtractPathText="Where do you want to install WinGit?"' &&
68 echo 'ExtractTitle="Extracting..."' &&
69 echo 'GUIFlags="8+32+64+256+4096"' &&
71 echo 'InstallPath="%PROGRAMFILES%\\Git"' &&
72 echo 'OverwriteMode="0"' &&
73 echo 'RunProgram="\"%%T\\bin\\wish.exe\" \"%%T\bin\install.tcl\" \"%%T\""' &&
74 echo ';!@InstallEnd@!7z' &&
75 cat $TARGET7) > "$TARGET"