mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-22 04:14:02 +02:00
Don't commit unchanged patches
This commit is contained in:
parent
90ac03522a
commit
443e45e276
|
@ -12,10 +12,16 @@ do
|
||||||
dos2unix -q $1/net/minecraft/server/$file $1/net/minecraft/server/$file
|
dos2unix -q $1/net/minecraft/server/$file $1/net/minecraft/server/$file
|
||||||
outName=$(echo nms-patches/"$(echo $file | cut -d. -f1)".patch)
|
outName=$(echo nms-patches/"$(echo $file | cut -d. -f1)".patch)
|
||||||
patchNew=$(diff -u $1/net/minecraft/server/$file src/main/java/net/minecraft/server/$file)
|
patchNew=$(diff -u $1/net/minecraft/server/$file src/main/java/net/minecraft/server/$file)
|
||||||
|
if [ -f "$outName" ]
|
||||||
|
then
|
||||||
patchCut=$(echo "$patchNew" | tail -n +3)
|
patchCut=$(echo "$patchNew" | tail -n +3)
|
||||||
patchOld=$(cat "$outName" | tail -n +3)
|
patchOld=$(cat "$outName" | tail -n +3)
|
||||||
if [ "$patchCut" != "$patchOld" ] ; then
|
if [ "$patchCut" != "$patchOld" ] ; then
|
||||||
echo "$outName changed"
|
echo "$outName changed"
|
||||||
echo "$patchNew" > "$outName"
|
echo "$patchNew" > "$outName"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "New patch $outName"
|
||||||
|
echo "$patchNew" > "$outName"
|
||||||
|
fi
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user