Make Spigot its own submodule
Merge pull request #118 from Techcable/spigot-in-submodule
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user