SubServers BungeeCord Patcher
Add a way to patch a build of BungeeCord into SubServers.Bungee/SubServers.Sync
This commit is contained in:
parent
bb1a25fc3f
commit
185ce70cd9
|
@ -55,6 +55,7 @@ crashlytics-build.properties
|
|||
/Artifacts/-Maven/
|
||||
/Artifacts/-History/
|
||||
/Artifacts/-Icon/
|
||||
/Artifacts/SubServers.Patched.jar
|
||||
/Artifacts/SubServers.Test.jar
|
||||
/SubServers.Test/
|
||||
/build.ant
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
# SubServers Library Patcher: Combines BungeeCord and SubServers.Bungee/SubServers.Sync into one jar file
|
||||
# Usage: "bash SubServers.Bungee.Patcher.sh <BungeeCord.jar> <SubServers.jar>"
|
||||
#
|
||||
#!/usr/bin/env bash
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo ERROR: No BungeeCord File Supplied
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$1" ]
|
||||
then
|
||||
echo ERROR: Cannot find $1
|
||||
exit 2
|
||||
fi
|
||||
if [ -z "$2" ]
|
||||
then
|
||||
echo ERROR: No SubServers File Supplied
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$2" ]
|
||||
then
|
||||
echo ERROR: Cannot find $2
|
||||
exit 2
|
||||
fi
|
||||
if [ -d "Buildtools" ]; then
|
||||
rm -Rf Buildtools
|
||||
fi
|
||||
mkdir BuildTools
|
||||
cd BuildTools
|
||||
echo Extracting $1...
|
||||
jar xf ../$1; retvala=$?;
|
||||
if [ $retvala -eq 0 ]
|
||||
then
|
||||
echo Extracting $2...
|
||||
jar xf ../$2; retvalb=$?;
|
||||
if [ $retvalb -eq 0 ]
|
||||
then
|
||||
echo Recompiling...
|
||||
jar cvfm ../SubServers.Patched.jar META-INF/MANIFEST.MF .; retvalc=$?;
|
||||
if [ $retvalc -eq 0 ]
|
||||
then
|
||||
echo Cleaning Up...
|
||||
rm -Rf ../Buildtools
|
||||
exit 0;
|
||||
else
|
||||
echo Error Recomiling Files
|
||||
rm -Rf ../Buildtools
|
||||
exit 4
|
||||
fi
|
||||
else
|
||||
echo Error Decompiling $2 Files
|
||||
rm -Rf ../Buildtools
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
echo Error Decompiling $1 Files
|
||||
rm -Rf ../Buildtools
|
||||
exit 3
|
||||
fi
|
Loading…
Reference in New Issue