WinGit: refactored file copying to copy-files.sh
[msysgit.git] / share / WinGit / release.sh
blob14d8c48a5be8f5ed080457b0c923abe6f6e0a4b9
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=etc/fileList.txt
12 TMPDIR=/tmp/WinGit
14 "$(dirname $0)/copy-files.sh" $TMPDIR &&
15 cd "$TMPDIR" &&
16 sed "s/@@WINGITVERSION@@/$1/" < /share/WinGit/install.tcl > bin/install.tcl &&
17 : > "$LIST7" &&
18 find * -type f | sed "s|^\./||" > "$LIST7" &&
19 7z a $OPTS7 $TARGET7 @"$LIST7" ||
20 exit
22 (cat /share/7-Zip/7zSD.sfx &&
23 echo ';!@Install@!UTF-8!' &&
24 echo 'Progress="yes"' &&
25 echo 'Title="WinGit: MinGW Git + minimal MSys installation"' &&
26 echo 'BeginPrompt="This program installs a complete Git for MSys setup"' &&
27 echo 'CancelPrompt="Do you want to cancel WinGit installation?"' &&
28 echo 'ExtractDialogText="Please, wait..."' &&
29 echo 'ExtractPathText="Where do you want to install WinGit?"' &&
30 echo 'ExtractTitle="Extracting..."' &&
31 echo 'GUIFlags="8+32+64+256+4096"' &&
32 echo 'GUIMode="1"' &&
33 echo 'InstallPath="%PROGRAMFILES%\\Git"' &&
34 echo 'OverwriteMode="0"' &&
35 echo 'RunProgram="\"%%T\\bin\\wish.exe\" \"%%T\bin\install.tcl\" \"%%T\""' &&
36 echo ';!@InstallEnd@!7z' &&
37 cat $TARGET7) > "$TARGET"
38 exit