Make 7z functional
[msysgit.git] / share / WinGit / release.sh
blob110112448353cbc7a069fd0b34cbfac551df9416
1 #!/bin/sh
3 test -z "$1" && {
4 echo "Usage: $0 <version>"
5 exit 1
8 TARGET="$HOME"/WinGit-$1.exe
9 OPTS7="-m0=lzma -mx=9 -md=64M"
10 TARGET7=tmp.7z
11 LIST7=fileList.txt
12 TMPDIR=/tmp/WinGit
14 (test ! -d "$TMPDIR" || echo "Removing $TMPDIR" && rm -rf "$TMPDIR") &&
15 mkdir "$TMPDIR" &&
16 cd "$TMPDIR" &&
17 echo "Copying files" &&
18 (cd / && tar cf - bin/ lib/perl5/) |
19 tar xvf - &&
20 (cd /mingw && tar cf - bin/*{tcl,tk,wish,gpg,curl.exe}* \
21 lib/*{tcl,tk}* libexec/gnupg/) |
22 tar xvf - &&
23 mkdir etc &&
24 cp /etc/profile etc/ &&
25 cp /share/WinGit/install.tcl ./ &&
26 : > "$LIST7" &&
27 find * -type f | sed "s|^\./||" > "$LIST7" &&
28 7z a $OPTS7 $TARGET7 @"$LIST7" ||
29 exit
31 (cat /share/7-Zip/7zSD.sfx &&
32 echo ';!@Install@!UTF-8!' &&
33 echo 'Progress="yes"' &&
34 echo 'Directory="%%T\bin"' &&
35 echo 'RunProgram="wish.exe %%T\install.tcl %%T"' &&
36 echo ';!@InstallEnd@!7z' &&
37 cat $TARGET7) > "$TARGET"
38 exit