4 echo "Usage: $0 <version>"
8 # change directory to msysGit root
9 cd "$(dirname "$0")"/..
/.. ||
{
10 echo "Could not change directory to msysGit root" >&2
13 CWD
="$(echo $(pwd) | sed 's/\/$//')/."
15 TARGET
="$HOME"/PortableGit-
$1.7z
16 OPTS7
="-m0=lzma -mx=9 -md=64M"
20 DONT_REMOVE_BUILTINS
=1 "$(dirname $0)/copy-files.sh" $TMPDIR &&
22 cp $CWD/share
/WinGit
/README.portable .
/ &&
23 cp $CWD/msys.bat .
/git-bash.bat
&&
24 cp $CWD/git-cmd.bat .
/ &&
25 $CWD/share
/7-Zip/7za.exe a
$OPTS7 $TARGET7 * ||
30 (cat $CWD/share
/7-Zip/7zSD.sfx
&&
31 echo ';!@Install@!UTF-8!' &&
32 echo 'Progress="yes"' &&
33 echo 'Title="WinGit: MinGW Git + minimal MSys installation"' &&
34 echo 'BeginPrompt="This program installs a complete Git for MSys setup"' &&
35 echo 'CancelPrompt="Do you want to cancel WinGit installation?"' &&
36 echo 'ExtractDialogText="Please, wait..."' &&
37 echo 'ExtractPathText="Where do you want to install WinGit?"' &&
38 echo 'ExtractTitle="Extracting..."' &&
39 echo 'GUIFlags="8+32+64+256+4096"' &&
41 echo 'InstallPath="%PROGRAMFILES%\\Git"' &&
42 echo 'OverwriteMode="0"' &&
43 echo ';!@InstallEnd@!7z' &&
44 cat $TARGET7) > "$TARGET"
46 mv $TARGET7 > "$TARGET"
48 echo "Created $TARGET"