full installer's initialize.sh: try to initialize 'master' correctly
[msysgit/kusma.git] / share / msysGit / full / release.sh
blob883c14e3f5a550f3412a54cf63a0a36a00eadcf9
1 #!/bin/sh
3 case "$1" in
4 '')
5 echo "Usage: $0 <version>"
6 exit 1
7 esac
9 VERSION="$1"
10 TARGET="$HOME"/msysGit-fullinstall-$VERSION.exe
12 case "$(basename "$(cd /; pwd -W)")" in
13 msysGit|msysgit) ;;
15 echo "Basename of the msysGit directory is not msysGit"
16 exit 1
17 esac
19 cd "$(dirname "$(cd /; pwd -W)")"
21 # get list
22 LIST=list.txt
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
27 exit 1
30 (cd / &&
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/|' &&
36 echo "git/gitweb") |
37 sed "s|^|msysGit/|" > $LIST &&
39 # make installer
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"' &&
54 echo 'GUIMode="1"' &&
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"