Mark msysGit as obsolete
[msysgit.git] / share / WinGit / portable-release.sh
blobcc074c57dfb32d9dec6c33b02de9cba233b5c040
1 #!/bin/sh
3 test -z "$1" && {
4 echo "Usage: $0 <version>"
5 exit 1
8 # change directory to msysGit root
9 SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
10 MSYSGITROOT="$(cd $SCRIPTDIR/../../ && pwd | sed 's/\/$//')/."
11 cd $MSYSGITROOT || {
12 echo "Could not change directory to msysGit root" >&2
13 exit 1
16 TARGET="$HOME"/PortableGit-$1.7z
17 OPTS7="-m0=lzma -mx=9 -md=64M"
18 TARGET7=tmp.7z
19 TMPDIR=/tmp/WinGit
21 DONT_REMOVE_BUILTINS=1 "$(dirname $0)/copy-files.sh" $TMPDIR &&
22 sed -e '/share\/msysGit/d' -e "s/msysGit/Portable Git (version $1)/" \
23 < etc/motd > $TMPDIR/etc/motd &&
24 cd "$TMPDIR" &&
25 cp $MSYSGITROOT/share/WinGit/README.portable ./ &&
26 cp $MSYSGITROOT/msys.bat ./git-bash.bat &&
27 cp $MSYSGITROOT/git-cmd.bat ./ &&
28 $MSYSGITROOT/share/7-Zip/7za.exe a $OPTS7 $TARGET7 * ||
29 exit
31 if test -z "$NO_SFX"
32 then
33 (cat $MSYSGITROOT/share/7-Zip/7zSD.sfx &&
34 echo ';!@Install@!UTF-8!' &&
35 echo 'Progress="yes"' &&
36 echo 'Title="WinGit: MinGW Git + minimal MSys installation"' &&
37 echo 'BeginPrompt="This program installs a complete Git for MSys setup"' &&
38 echo 'CancelPrompt="Do you want to cancel WinGit installation?"' &&
39 echo 'ExtractDialogText="Please, wait..."' &&
40 echo 'ExtractPathText="Where do you want to install WinGit?"' &&
41 echo 'ExtractTitle="Extracting..."' &&
42 echo 'GUIFlags="8+32+64+256+4096"' &&
43 echo 'GUIMode="1"' &&
44 echo 'InstallPath="%PROGRAMFILES%\\Git"' &&
45 echo 'OverwriteMode="0"' &&
46 echo ';!@InstallEnd@!7z' &&
47 cat $TARGET7) > "$TARGET"
48 else
49 mv $TARGET7 "$TARGET"
50 fi &&
51 echo "Created $TARGET"