2011-10-11 22:38:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "MinecraftForge Linux Setup Program"
|
|
|
|
echo
|
|
|
|
|
2012-03-05 23:06:54 +00:00
|
|
|
if [ ! -f ../runtime/bin/fernflower.jar ]
|
2012-03-04 01:56:15 +00:00
|
|
|
then
|
|
|
|
python download_fernflower.py
|
|
|
|
fi
|
|
|
|
|
2012-03-05 23:06:54 +00:00
|
|
|
if [ ! -f ../runtime/bin/fernflower.jar ]
|
2012-03-04 01:56:15 +00:00
|
|
|
then
|
2012-03-12 23:55:59 +00:00
|
|
|
echo "Failed to download fernflower, install it manually and re-run setup."
|
|
|
|
exit 1
|
2012-03-04 01:56:15 +00:00
|
|
|
fi
|
|
|
|
|
2011-10-11 22:38:39 +00:00
|
|
|
pushd .. > /dev/null
|
|
|
|
|
2011-12-11 07:04:21 +00:00
|
|
|
rm -rf conf
|
|
|
|
mkdir conf
|
|
|
|
cp -r forge/conf/* conf
|
|
|
|
|
2011-10-11 22:38:39 +00:00
|
|
|
./cleanup.sh
|
2012-03-12 23:55:59 +00:00
|
|
|
if [ -d "src" ]
|
|
|
|
then
|
|
|
|
echo "Failed to cleanup the MCP folder, please backup your modified files and run this script again and say yes when promped."
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-03-04 01:56:15 +00:00
|
|
|
./decompile.sh
|
2011-12-11 07:04:21 +00:00
|
|
|
|
2011-10-11 22:38:39 +00:00
|
|
|
pushd src > /dev/null
|
2011-12-11 07:37:54 +00:00
|
|
|
if [ -f ../jars/bin/minecraft.jar ];
|
|
|
|
then
|
|
|
|
for i in `find ../forge/patches/minecraft/ -type f`
|
|
|
|
do
|
|
|
|
patch -p2 -i $i
|
|
|
|
done
|
2012-02-18 18:47:45 +00:00
|
|
|
cp -r ../forge/src/minecraft/* minecraft
|
2011-12-11 07:37:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f ../jars/minecraft_server.jar ];
|
|
|
|
then
|
|
|
|
for i in `find ../forge/patches/minecraft_server/ -type f`
|
|
|
|
do
|
|
|
|
patch -p2 -i $i
|
|
|
|
done
|
2012-02-18 18:47:45 +00:00
|
|
|
cp -r ../forge/src/minecraft_server/* minecraft_server
|
2011-12-11 07:37:54 +00:00
|
|
|
fi
|
2011-10-11 22:38:39 +00:00
|
|
|
popd > /dev/null
|
|
|
|
|
2012-03-05 20:44:00 +00:00
|
|
|
./updatemcp.sh -f
|
|
|
|
./updatenames.sh -f
|
|
|
|
./updatemd5.sh -f
|