[CI-SKIP] Download mojang libraries sources so we can modify them

This commit is contained in:
Aikar 2018-09-03 19:55:14 -04:00
parent 997190c3e0
commit f90c38b8f5
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
2 changed files with 63 additions and 0 deletions

View file

@ -29,6 +29,26 @@ function import {
fi
}
function importLibrary {
group=$1
lib=$2
prefix=$3
shift 3
for file in "$@"; do
file="$prefix/$file"
target="$workdir/Spigot/Spigot-Server/src/main/java/${file}"
targetdir=$(dirname "$target")
mkdir -p "${targetdir}"
base="$workdir/Minecraft/$minecraftversion/libraries/${group}/${lib}/$file"
if [ ! -f "$base" ]; then
echo "Missing $base"
exit 1
fi
export MODLOG="$MODLOG Imported $file from $lib\n";
cp "$base" "$target" || exit 1
done
}
(
cd "$workdir/Spigot/Spigot-Server/"
lastlog=$($gitcmd log -1 --oneline)
@ -63,6 +83,10 @@ for f in $files; do
fi
done
# Import Libraries - these must always be mapped manually, no automatic stuff
# Temporarily add new NMS dev imports here before you run paper patch
# but after you have paper rb'd your changes, remove the line from this file before committing.
# we do not need any lines added to this file