Issue 21: core.autocrlf should be set to true (at least for end-users)
[msysgit.git] / bin / release-msysGit.sh
blob5f59feef5299721922d0db90e6f7f5445e538d9f
1 #!/bin/sh
3 case "$1" in
4 '')
5 echo "Usage: $0 <version> [<installer-to-update>]"
6 exit 1
7 esac
9 VERSION="$1"
10 UPDATE="$2"
11 ACTION=a
12 TARGET="$HOME"/msysGit-$VERSION.exe
14 test -z "$UPDATE" || {
15 test "$UPDATE" = "$TARGET" || mv "$UPDATE" "$TARGET" || exit
16 ACTION=u
17 } &&
19 case "$(basename "$(cd /; pwd -W)")" in
20 msysGit) ;;
22 echo "Basename of the msysGit directory is not msysGit"
23 exit 1
24 esac
26 cd "$(dirname "$(cd /; pwd -W)")"
28 # get list
29 LIST=list.txt
31 (cd / &&
32 git ls-files | grep -v '^\"\?git/gitweb' &&
33 echo "git/gitweb") |
34 sed "s|^|msysGit/|" > $LIST &&
36 # make installer
37 OPTS7="-m0=lzma -mx=9 -md=64M -sfx7z.sfx $TARGET" &&
39 "$PROGRAMFILES"/7-Zip/7z.exe $ACTION $OPTS7 @$LIST