-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·64 lines (49 loc) · 1.48 KB
/
build.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
62
63
64
#!/bin/bash
if [[ -z "${MCP}" ]]; then
echo "Please set \$MCP to your MCP working dir."
exit
fi
if [[ -z "${PROJBASE}" ]]; then
echo "Assuming project basedir is here."
PROJBASE=`pwd`
fi
BUILDSRC=$MCP/src
CLEANSRC=$MCP/src-dev
SPRITEFOLDER=MineFactorySprites
MODNAME=MineFactoryReloaded
MODVERSION=1.5.0
ZIPPATH=`which zip`
SRCBASE=$PROJBASE/source
CLIENTSRC=$SRCBASE/client
SERVERSRC=$SRCBASE/server
COMMONSRC=$SRCBASE/common
RELEASEBASE=$PROJBASE/release
RELEASECLIENT=$RELEASEBASE/clienttemp
RELEASESERVER=$RELEASEBASE/servertemp
echo "This assumes you have a clean (with BC API) copy of the decompiled code in src-dev. press ctrl-c now if you don't."
echo "Press any key to continue."
read
mkdir -p $RELEASECLIENT
mkdir -p $RELEASESERVER
rm -rf $BUILDSRC
cp -a $CLEANSRC $BUILDSRC
cp -a $COMMONSRC $BUILDSRC/minecraft/
cp -a $COMMONSRC $BUILDSRC/minecraft_server
cp -a $CLIENTSRC $BUILDSRC/minecraft/
cp -a $SERVERSRC $BUILDSRC/minecraft_server/
pushd $MCP
./recompile.sh
./reobfuscate.sh
rm -rf $RELEASEBASE/*.zip
rm -rf $RELEASECLIENT/*
rm -rf $RELEASESERVER/*
cp -a $MCP/reobf/minecraft/* $RELEASECLIENT/
cp -a $MCP/reobf/minecraft_server/* $RELEASESERVER/
cp -a $PROJBASE/sprites $RELEASECLIENT/$SPRITEFOLDER
rm -rf $RELEASECLIENT/buildcraft $RELEASECLIENT/net
rm -rf $RELEASESERVER/buildcraft $RELEASESERVER/net
cd $RELEASECLIENT
$ZIPPATH -r -q $RELEASEBASE/"$MODNAME"_Client_"$MODVERSION".zip *
cd $RELEASESERVER
$ZIPPATH -r -q $RELEASEBASE/"$MODNAME"_Server_"$MODVERSION".zip *
popd