3 # Recreate GitMe-$VERSION.exe
6 echo "Usage: $0 <version>"
10 TARGET
="$HOME"/GitMe-
"$1".exe
11 TMPDIR
=/tmp
/installer-tmp
12 OPTS7
="-m0=lzma -mx=9 -md=64M"
16 test ! -d "$TMPDIR" ||
rm -rf "$TMPDIR" ||
exit
19 (cd ..
&& test ! -f "$TMPPACK" ||
rm "$TMPPACK") &&
20 echo "Copying files" &&
21 cat "$SHARE"/fileList.txt |
(cd / && tar -c --file=- --files-from=-) |
23 cat "$SHARE"/fileList-mingw.txt |
24 (cd /mingw
&& tar -c --file=- --files-from=-) |
28 cp "$SHARE"/gitconfig etc
/ &&
29 cp "$SHARE"/bootstrap.cmd .
/ &&
30 cp "$SHARE"/bootstrap.sh .
/ &&
31 echo "Creating archive" &&
33 for file in "$TMPDIR/bin/"*; do
34 fixfile
=`echo ${file} | sed -e "s,.*exe$,," -e "s,.*dll$,,"`
35 if [ -n "$fixfile" ]; then
36 echo Fixing interpreter line on
file ${fixfile}
37 sed -e "s,^#!.*/bin/sh$,#!/bin/sh," ${fixfile} > ${fixfile}.tmp
38 mv ${fixfile}.tmp
${fixfile}
41 7z a
$OPTS7 "$TMPPACK" installer-tmp
&&
42 cat /mingw
/bin
/7zSD.sfx
"$SHARE"/7z-install.txt
"$TMPPACK" > "$TARGET" &&
43 echo Success
! You
\'ll
find the new installer
at $TARGET