Undo hacky she-bang fixup
[msysgit.git] / share / GitMe / release.sh
blobad8c3dcce8ef4e408af86d5a23900e6c38b8198d
1 #!/bin/sh
3 # Recreate GitMe-$VERSION.exe
5 test -z "$1" && {
6 echo "Usage: $0 <version>"
7 exit 1
10 TARGET="$HOME"/GitMe-"$1".exe
11 TMPDIR=/tmp/installer-tmp
12 OPTS7="-m0=lzma -mx=9 -md=64M"
13 TMPPACK=/tmp.7z
14 SHARE=/share/GitMe
16 test ! -d "$TMPDIR" || rm -rf "$TMPDIR" || exit
17 mkdir "$TMPDIR" &&
18 cd "$TMPDIR" &&
19 (cd .. && test ! -f "$TMPPACK" || rm "$TMPPACK") &&
20 echo "Copying files" &&
21 cat "$SHARE"/fileList.txt | (cd / && tar -c --file=- --files-from=-) |
22 tar xvf - &&
23 cat "$SHARE"/fileList-mingw.txt |
24 (cd /mingw && tar -c --file=- --files-from=-) |
25 tar xvf - &&
26 strip bin/*.exe &&
27 mkdir etc &&
28 cp "$SHARE"/gitconfig etc/ &&
29 cp "$SHARE"/bootstrap.cmd ./ &&
30 cp "$SHARE"/setup-msysgit.sh ./ &&
31 echo "Creating archive" &&
32 cd .. &&
33 7z a $OPTS7 "$TMPPACK" installer-tmp &&
34 cat /share/7-Zip/7zSD.sfx "$SHARE"/7z-install.txt "$TMPPACK" > "$TARGET" &&
35 echo Success! You\'ll find the new installer at $TARGET
36 rm $TMPPACK