4 echo "Usage: $0 <version>"
8 TARGET
="$HOME"/WinGit-
$1.exe
9 OPTS7
="-m0=lzma -mx=9 -md=64M"
14 (test ! -d "$TMPDIR" ||
echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
16 (cd "$(dirname "$0")" &&
18 cp create-shortcut.exe
"$TMPDIR") &&
19 cp /share
/resources
/git.ico
"$TMPDIR" &&
21 echo "Copying files" &&
22 (cd / && tar cf
- bin
/ lib
/perl
5/) |
24 gitmd5
=$
(md5sum bin
/git.exe | cut
-c 1-32) &&
25 md5sum bin
/git-
*.exe |
sed -n "s/^$gitmd5 \\*//p" > fileList-builtins.txt
&&
26 rm $
(cat fileList-builtins.txt
) &&
27 (cd /mingw
&& tar cf
- bin
/*{tcl
,tk
,wish
,gpg
,curl.exe
}* \
28 lib
/*{tcl
,tk
}* libexec
/gnupg
/) |
30 strip bin
/{[a-fh-z
],g
[a-oq-z
],gp
[a-fh-z
]}*.exe
&&
32 cp /git
/contrib
/completion
/git-completion.bash etc
/ &&
33 sed 's/^\. .*\(git-completion.bash\)/. \/etc\/\1/' \
34 < /etc
/profile
> etc
/profile
&&
35 cp /share
/WinGit
/install.tcl .
/ &&
37 find * -type f |
sed "s|^\./||" > "$LIST7" &&
38 7z a
$OPTS7 $TARGET7 @
"$LIST7" ||
41 (cat /share
/7-Zip/7zSD.sfx
&&
42 echo ';!@Install@!UTF-8!' &&
43 echo 'Progress="yes"' &&
44 echo 'Directory="%%T\bin"' &&
45 echo 'RunProgram="wish.exe %%T\install.tcl %%T"' &&
46 echo ';!@InstallEnd@!7z' &&
47 cat $TARGET7) > "$TARGET"