ForgePatch/forge/package.sh

86 lines
1.2 KiB
Bash
Raw Normal View History

version=$1
2011-07-30 16:13:14 +00:00
build_dir=`pwd`
dir=`pwd`/../forge-$version
function remove_svn () {
(
cd $1
if [ -d .svn ]; then
rm -rf .svn
fi
for j in `ls`
do
if [ -d $j ]; then
remove_svn $j
fi
done
)
}
function package_all () {
qual=$1
cp $build_dir/minecraftforge_credits.txt .
zip -r $dir/minecraftforge$qual-$version.zip \
minecraftforge_credits.txt \
*.class \
2011-07-16 22:39:55 +00:00
forge
}
cd ../reobf
remove_svn .
rm -rf $dir
mkdir $dir
cd minecraft
package_all "-client"
cd ../minecraft_server
package_all "-server"
cd ../..
2011-07-16 22:39:55 +00:00
rm -rf reobf
2011-07-30 16:13:14 +00:00
cd $build_dir
mkdir forge
cd forge
2011-07-30 16:13:14 +00:00
mkdir src
mkdir src/minecraft
mkdir src/minecraft_server
mkdir patches
mkdir conf
cp -r ../forge_client/src/* src/minecraft
cp -r ../forge_server/src/* src/minecraft_server
cp -r ../forge_common/* src/minecraft
cp -r ../forge_common/* src/minecraft_server
cp -r ../patches/* patches
cp -r ../conf/* conf
cp ../lfcr.py .
cp ../install/install.cmd .
cp ../install/install.sh .
cp ../modLoaderMP.patch .
cp ../MLProp.java .
cp ../install/README.txt .
cp ../minecraftforge_credits.txt .
cp -r ../doc .
2011-07-30 16:13:14 +00:00
2011-07-30 21:25:39 +00:00
cd src
remove_svn .
cd ../patches
remove_svn .
cd ../conf
remove_svn .
2011-07-30 21:25:39 +00:00
cd ..
cd ..
zip -r $dir/minecraftforge-src-$version.zip forge
rm -rf forge