Point the net installer to the 'devel' branches
[msysgit.git] / share / msysGit / net / release.sh
blobb93e8993deea2865ce44fe67addaa95c6ed7e2a6
1 #!/bin/sh
3 # Recreate msysGit-netinstall-$VERSION.exe
5 test -z "$1" && {
6 echo "Usage: $0 <version> [<msysgitbranch> [<4msysgitbranch>]]"
7 exit 1
10 MSYSGITBRANCH="$2"
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"
17 TMPPACK=/tmp.7z
18 SHARE=/share/msysGit/net
20 test ! -d "$TMPDIR" || rm -rf "$TMPDIR" || exit
21 mkdir "$TMPDIR" &&
22 cd "$TMPDIR" &&
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) |
27 tar xvf - &&
28 test 0 = "$(cat /tmp/exitstatus)" &&
29 cat "$SHARE"/fileList-mingw.txt |
30 (cd /mingw && tar -c --file=- --files-from=-;
31 echo $? > /tmp/exitstatus) |
32 tar xvf - &&
33 test 0 = "$(cat /tmp/exitstatus)" &&
34 strip bin/*.exe libexec/git-core/*.exe &&
35 mkdir etc &&
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" &&
41 cd .. &&
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"' &&
52 echo 'GUIMode="1"' &&
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\"." &&
61 rm $TMPPACK