3 # Recreate msysGit-netinstall-$VERSION.exe
6 echo "Usage: $0 <version> [<msysgitbranch> [<4msysgitbranch>]]"
11 test -z "$MSYSGITBRANCH" && MSYSGITBRANCH
=devel
12 FOURMSYSGITBRANCH
="$3"
14 TARGET
="$HOME"/msysGit-netinstall-
"$1".exe
15 TMPDIR
=/tmp
/installer-tmp
16 OPTS7
="-m0=lzma -mx=9 -md=64M"
18 SHARE
=/share
/msysGit
/net
20 test ! -d "$TMPDIR" ||
rm -rf "$TMPDIR" ||
exit
23 (cd ..
&& test ! -f "$TMPPACK" ||
rm "$TMPPACK") &&
24 echo "Copying files" &&
25 cat "$SHARE"/fileList.txt |
26 (cd / && tar -c --file=- --files-from=-; echo $?
> /tmp
/exitstatus
) |
28 test 0 = "$(cat /tmp/exitstatus)" &&
29 cat "$SHARE"/fileList-mingw.txt |
30 (cd /mingw
&& tar -c --file=- --files-from=-;
31 echo $?
> /tmp
/exitstatus
) |
33 test 0 = "$(cat /tmp/exitstatus)" &&
34 strip bin
/*.exe libexec
/git-core
/*.exe
&&
36 cp "$SHARE"/gitconfig etc
/ &&
37 sed -e "s|@@MSYSGITBRANCH@@|$MSYSGITBRANCH|g" \
38 -e "s|@@FOURMSYSGITBRANCH@@|$FOURMSYSGITBRANCH|g" \
39 < "$SHARE"/setup-msysgit.sh
> setup-msysgit.sh
&&
40 echo "Creating archive" &&
42 /share
/7-Zip/7za.exe a
$OPTS7 "$TMPPACK" installer-tmp
&&
43 (cat /share
/7-Zip/7zSD.sfx
&&
44 echo ';!@Install@!UTF-8!' &&
45 echo 'Title="msysGit-netinstall: MinGW Git + MSys DevEnv installation"' &&
46 echo 'BeginPrompt="This archive contains the minimal system needed to\nbootstrap the latest MinGW Git and MSys environment"' &&
47 echo 'CancelPrompt="Do you want to cancel MSysGit installation?"' &&
48 echo 'ExtractDialogText="Please, wait..."' &&
49 echo 'ExtractPathText="Where do you want to install MSysGit?"' &&
50 echo 'ExtractTitle="Extracting..."' &&
51 echo 'GUIFlags="8+32+64+256+4096"' &&
53 echo 'InstallPath="C:\\msysgit"' &&
54 echo 'OverwriteMode="2"' &&
55 echo 'RunProgram="\"%%T\installer-tmp\bin\sh.exe\" /setup-msysgit.sh"' &&
56 echo 'Delete="%%T\installer-tmp"' &&
57 echo 'RunProgram="\"%%T\bin\sh.exe\" --login -i"' &&
58 echo ';!@InstallEnd@!' &&
59 cat "$TMPPACK") > "$TARGET" &&
60 echo "Success! You'll find the new installer at \"$TARGET\"." &&