-
Notifications
You must be signed in to change notification settings - Fork 7
/
release_windows.sh
executable file
·61 lines (50 loc) · 1.18 KB
/
release_windows.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
PROJECT=pj64raphnetraw
if [ $# -ne 2 ]; then
echo "Syntax: ./release.sh version releasedir"
echo
exit
fi
VERSION=$1
RELEASEDIR=$2
DIRNAME=$PROJECT-$VERSION
FILENAME=$PROJECT-$VERSION.zip
if [ -d $RELEASEDIR/$DIRNAME ]; then
echo "$RELEASEDIR/$DIRNAME already exists";
exit 1
fi
mkdir -p $RELEASEDIR/$DIRNAME
if [ $? -ne 0 ]; then
echo "Could not mkdir"
exit 1
fi
cd src
if [ $? -ne 0 ]; then
echo "Could not chdir"
exit 1
fi
make clean
make all
if [ $? -ne 0 ]; then
echo "Build failed"
exit 1
fi
cd .. # exit src
cp src/pj64raphnetraw.dll -v $RELEASEDIR/$DIRNAME
cp src/pj64raphnetraw_ports1and4.dll -v $RELEASEDIR/$DIRNAME
cp src/pj64raphnetraw_ports1and3.dll -v $RELEASEDIR/$DIRNAME
cp src/pj64raphnetraw_1player.dll -v $RELEASEDIR/$DIRNAME
cp src/pj64raphnetraw_net.dll -v $RELEASEDIR/$DIRNAME
cp src/pj64raphnetraw_net_multiplayer.dll -v $RELEASEDIR/$DIRNAME
cp ../hidapi/windows/.libs/*.dll -v $RELEASEDIR/$DIRNAME
cp README.md -rv $RELEASEDIR/$DIRNAME
cp README.md -rv $RELEASEDIR/$DIRNAME/readme.txt
cp changelog.txt -rv $RELEASEDIR/$DIRNAME
cd $RELEASEDIR
zip -r $FILENAME $DIRNAME
echo
echo
echo
echo -------------------------------------
ls -lh $FILENAME
echo Done