mirror of
https://github.com/ME1312/SubServers-2.git
synced 2025-01-26 09:31:19 +01:00
Generate difference list
This commit is contained in:
parent
1dfdc494f3
commit
53d57cada9
@ -26,37 +26,51 @@ if [ -d "Buildtools" ]; then
|
||||
rm -Rf Buildtools
|
||||
fi
|
||||
mkdir BuildTools
|
||||
cd BuildTools
|
||||
mkdir BuildTools/Vanilla.jar
|
||||
mkdir BuildTools/Modded.jar
|
||||
cd BuildTools/Modded.jar
|
||||
echo ">> Extracting $1..."
|
||||
jar xvf ../$1; retvala=$?;
|
||||
jar xvf ../../$1; retvala=$?;
|
||||
if [ $retvala -eq 0 ]
|
||||
then
|
||||
if [ -f "LICENSE.txt" ]; then
|
||||
rm -Rf LICENSE.txt
|
||||
fi
|
||||
if [ -f "LICENSE" ]; then
|
||||
rm -Rf LICENSE
|
||||
fi
|
||||
cd ../Vanilla.jar
|
||||
echo ">> Extracting $2..."
|
||||
jar xvf ../$2; retvalb=$?;
|
||||
jar xvf ../../$2; retvalb=$?;
|
||||
if [ $retvalb -eq 0 ]
|
||||
then
|
||||
if [ -d "../SubServers.Patched.jar" ]; then
|
||||
rm -Rf ../SubServers.Patched.jar
|
||||
fi
|
||||
echo ">> Writing Changes..."
|
||||
yes | cp -rf . ../Modded.jar
|
||||
printf "\n " >> META-INF/MANIFEST.MF
|
||||
cd ../
|
||||
printf "# SubServers.Bungee.Patcher generated difference list (may be empty if git is not installed)\n#\n> git --no-pager diff --no-index --name-status BuildTools/Vanilla.jar BuildTools/Modded.jar\n" > MODIFICATIONS
|
||||
git --no-pager diff --no-index --name-status Vanilla.jar Modded.jar | sed -e "s/\tVanilla.jar\//\t\//" -e "s/\tModded.jar\//\t\//" >> MODIFICATIONS
|
||||
mv -f MODIFICATIONS Modded.jar
|
||||
cd Modded.jar
|
||||
echo ">> Recompiling..."
|
||||
jar cvfm ../SubServers.Patched.jar META-INF/MANIFEST.MF .; retvalc=$?;
|
||||
jar cvfm ../../SubServers.Patched.jar META-INF/MANIFEST.MF .; retvalc=$?;
|
||||
if [ $retvalc -eq 0 ]
|
||||
then
|
||||
echo ">> Cleaning Up..."
|
||||
rm -Rf ../Buildtools
|
||||
rm -Rf ../../Buildtools
|
||||
exit 0;
|
||||
else
|
||||
echo ">> Error Recomiling Files"
|
||||
rm -Rf ../Buildtools
|
||||
rm -Rf ../../Buildtools
|
||||
exit 4
|
||||
fi
|
||||
else
|
||||
echo ">> Error Decompiling $2 Files"
|
||||
rm -Rf ../Buildtools
|
||||
rm -Rf ../../Buildtools
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
echo ">> Error Decompiling $1 Files"
|
||||
rm -Rf ../Buildtools
|
||||
rm -Rf ../../Buildtools
|
||||
exit 3
|
||||
fi
|
2
LICENSE
2
LICENSE
@ -186,7 +186,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
Copyright 2017 ME1312
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
Loading…
Reference in New Issue
Block a user