msysGit: 7z cannot update existing installers
[msysgit.git] / share / msysGit / release.sh
blobc0ec7edad6df0fd44680ba776440ed5e620a907f
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 -sfx7z.sfx $TARGET" &&
32 "$PROGRAMFILES"/7-Zip/7z.exe a $OPTS7 @$LIST