5 echo "Usage: $0 <version>"
10 TARGET
="$HOME"/msysGit-fullinstall-
$VERSION.exe
12 case "$(basename "$
(cd /; pwd -W)")" in
15 echo "Basename of the msysGit directory is not msysGit"
19 cd "$(dirname "$
(cd /; pwd -W)")"
24 git
--git-dir=/.git rev-parse
--verify HEAD
> /etc
/full-msysgit-sha1
&&
25 git
--git-dir=/git
/.git rev-parse
--verify HEAD
> /etc
/full-git-sha1 ||
{
26 echo "Could not get the current SHA-1s" >&2
31 echo etc
/full-msysgit-sha1
&&
32 echo etc
/full-git-sha1
&&
33 git ls-files |
grep -ve "^git$" -e "^doc/git/html$" &&
34 (cd doc
/git
/html
&& git ls-files |
sed 's|^|doc/git/html/|') &&
35 cd git
&& git ls-files |
grep -v '^\"\?gitweb' |
sed 's|^|git/|' &&
37 sed "s|^|msysGit/|" > $LIST &&
40 test -f "$TARGET".7z
&& rm "$TARGET".7z
41 OPTS7
="-m0=lzma -mx=9 -md=64M" &&
42 /share
/7-Zip/7z.exe a
$OPTS7 "$TARGET".7z @
$LIST &&
44 (cat /share
/7-Zip/7zSD.sfx
&&
45 echo ';!@Install@!UTF-8!' &&
46 echo 'Progress="yes"' &&
47 echo 'Title="GitMe: MinGW Git + MSys installation"' &&
48 echo 'BeginPrompt="This archive contains the complete system needed to\nbootstrap the latest MinGW Git and MSys environment"' &&
49 echo 'CancelPrompt="Do you want to cancel MSysGit installation?"' &&
50 echo 'ExtractDialogText="Please, wait..."' &&
51 echo 'ExtractPathText="Where do you want to install MSysGit?"' &&
52 echo 'ExtractTitle="Extracting..."' &&
53 echo 'GUIFlags="8+32+64+256+4096"' &&
55 echo 'InstallPath="C:\\msysgit"' &&
56 echo 'OverwriteMode="2"' &&
57 echo 'RunProgram="\"%%T\\msysGit\\bin\\sh.exe\" --login -i"' &&
58 echo ';!@InstallEnd@!7z' &&
59 cat "$TARGET".7z
) > "$TARGET"