Make Spigot its own submodule

Merge pull request #118 from Techcable/spigot-in-submodule
This commit is contained in:
Techcable
2016-03-21 12:22:47 -05:00
parent 044d463764
commit 291d1f7d21
183 changed files with 26 additions and 17849 deletions

View File

@@ -6,6 +6,7 @@ echo "Rebuilding Forked projects.... "
function applyPatch {
what=$1
what_name=$(basename $what)
target=$2
branch=$3
cd "$basedir/$what"
@@ -17,14 +18,14 @@ function applyPatch {
git clone "$what" "$target"
fi
cd "$basedir/$target"
echo "Resetting $target to $what..."
echo "Resetting $target to $what_name..."
git remote add -f upstream ../$what >/dev/null 2>&1
git checkout master >/dev/null 2>&1
git fetch upstream >/dev/null 2>&1
git reset --hard upstream/upstream
echo " Applying patches to $target..."
git am --abort >/dev/null 2>&1
git am --3way --ignore-whitespace "$basedir/${what}-Patches/"*.patch
git am --3way --ignore-whitespace "$basedir/${what_name}-Patches/"*.patch
if [ "$?" != "0" ]; then
echo " Something did not apply cleanly to $target."
echo " Please review above details and finish the apply then"
@@ -35,5 +36,15 @@ function applyPatch {
fi
}
applyPatch Bukkit Spigot-API HEAD && applyPatch CraftBukkit Spigot-Server patched
applyPatch Spigot-API Paper-API HEAD && applyPatch Spigot-Server Paper-Server HEAD
# Move into spigot dir
pushd Spigot
basedir=$basedir/Spigot
# Apply Spigot
applyPatch ../Bukkit Spigot-API HEAD && applyPatch ../CraftBukkit Spigot-Server patched
# Move out of Spigot
popd
basedir=$(dirname $basedir)
# Apply paper
applyPatch Spigot/Spigot-API Paper-API HEAD && applyPatch Spigot/Spigot-Server Paper-Server HEAD