forked from uncrustify/uncrustify
-
Notifications
You must be signed in to change notification settings - Fork 1
/
make_win32.sh
40 lines (30 loc) · 899 Bytes
/
make_win32.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /bin/sh
#
# Builds the release zip for Windows using mingw
# On ubuntu, you'll need to install the mingw32 package.
#
# grab the version - there is probably an easier way...
VERSION=`grep '#define UNCRUSTIFY_VERSION ' src/uncrustify_version.h | \
sed -e "s/#define UNCRUSTIFY_VERSION//" -e 's/\"//g' -e 's/ //g'`
VERDIR=uncrustify-$VERSION-win32
RELDIR=../release
THEZIP=$RELDIR/$VERDIR.zip
echo "Building version $VERSION for Win32"
./configure --host=i586-mingw32msvc
make clean
make
if [ -e $VERDIR ] ; then
rm -rf $VERDIR
fi
mkdir $VERDIR
cp src/uncrustify.exe $VERDIR/
cp etc/*.cfg $VERDIR/
cp ChangeLog $VERDIR/
cp documentation/htdocs/index.html $VERDIR/
strip $VERDIR/uncrustify.exe
if ! [ -e $RELDIR ] ; then
mkdir $RELDIR
fi
[ -e $THEZIP ] && rm -f $THEZIP
zip -r9 $THEZIP $VERDIR
echo "Stored in $THEZIP"