BUILDTOOLS-561: Improve support for paths with special characters

This commit is contained in:
md_5 2021-01-13 10:11:04 +11:00
parent 5fc0fb4e4c
commit a93cbb1e98
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11
2 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ applyPatch() {
echo " Applying patches to $target..." echo " Applying patches to $target..."
git am --abort >/dev/null 2>&1 git am --abort >/dev/null 2>&1
git am --3way "$basedir/${what}-Patches/"*.patch git am --3way "../${what}-Patches/"*.patch
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo " Something did not apply cleanly to $target." echo " Something did not apply cleanly to $target."
echo " Please review above details and finish the apply then" echo " Please review above details and finish the apply then"

View file

@ -29,16 +29,16 @@ savePatches() {
target=$2 target=$2
branch=$3 branch=$3
cd "$basedir/$target" cd "$basedir/$target"
git format-patch --no-stat -N -o "$basedir/${what}-Patches/" $branch git format-patch --no-stat -N -o "../${what}-Patches/" $branch
cd "$basedir" cd "$basedir"
git add -A "$basedir/${what}-Patches" git add -A "${what}-Patches"
if [ "$clean" != "clean" ]; then if [ "$clean" != "clean" ]; then
cleanupPatches "$basedir/${what}-Patches" cleanupPatches "${what}-Patches"
fi fi
echo " Patches saved for $what to $what-Patches/" echo " Patches saved for $what to $what-Patches/"
} }
if [ "$clean" == "clean" ]; then if [ "$clean" == "clean" ]; then
rm -rf *-Patches rm -rf *-Patches
fi fi
savePatches Bukkit Spigot-API origin/spigot savePatches Bukkit Spigot-API origin/spigot
savePatches CraftBukkit Spigot-Server origin/patched savePatches CraftBukkit Spigot-Server origin/patched