msysGit: we have 7zip installed in /share/7-Zip/ now
[git/jnareb-git.git] / share / msysGit / release.sh
blobfc6d10ba81d0c6897d8e3bf37335e3ca5405e0a4
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-$VERSION.exe
12 case "$(basename "$(cd /; pwd -W)")" in
13 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 (cd / &&
25 git ls-files | grep -v '^\"\?git/gitweb' &&
26 echo "git/gitweb") |
27 sed "s|^|msysGit/|" > $LIST &&
29 # make installer
30 OPTS7="-m0=lzma -mx=9 -md=64M" &&
31 /share/7-Zip/7z.exe a $OPTS7 "$TARGET".7z @$LIST &&
33 (cat /share/7-Zip/7zSD.sfx &&
34 echo ';!@Install@!UTF-8!' &&
35 echo 'Progress="yes"' &&
36 echo 'Title="GitMe: MinGW Git + MSys installation"' &&
37 echo 'BeginPrompt="This archive contains the complete system needed to\nbootstrap the latest MinGW Git and MSys environment"' &&
38 echo 'CancelPrompt="Do you want to cancel MSysGit installation?"' &&
39 echo 'ExtractDialogText="Please, wait..."' &&
40 echo 'ExtractPathText="Where do you want to install MSysGit?"' &&
41 echo 'ExtractTitle="Extracting..."' &&
42 echo 'GUIFlags="8+32+64+256+4096"' &&
43 echo 'GUIMode="1"' &&
44 echo 'InstallPath="C:\\msysgit"' &&
45 echo 'OverwriteMode="2"' &&
46 echo 'RunProgram="%%T\\msysGit\\bin\\sh.exe --login -i"' &&
47 echo ';!@InstallEnd@!7z' &&
48 cat "$TARGET".7z) > "$TARGET"