From 6a3b8598fb6514e7ead1e03fccddbf08ccb96a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?= Date: Sat, 11 Apr 2020 13:13:24 +0800 Subject: [PATCH] update upstream and fix scripts --- Paper | 2 +- akarin | 2 +- .../0007-Remove-method-profiler-callers.patch | 2 +- scripts/apply.sh | 2 -- scripts/push.sh | 15 ++++++--------- scripts/rebuildpatches.sh | 16 ++++++---------- 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/Paper b/Paper index 23ee0a8a8..0ed6da7ab 160000 --- a/Paper +++ b/Paper @@ -1 +1 @@ -Subproject commit 23ee0a8a889f352889907369b58c361a1b19f7ac +Subproject commit 0ed6da7ab2a309973e4b3bbe9e7abe56ea93fe2a diff --git a/akarin b/akarin index 44eac9520..40e522d79 100755 --- a/akarin +++ b/akarin @@ -12,7 +12,7 @@ case "$1" in ( set -e cd "$basedir" - scripts/rebuildPatches.sh "$basedir" $2 || exit 1 + scripts/rebuildpatches.sh "$basedir" || exit 1 ) || failed=1 ;; "p" | "patch" | "apply") diff --git a/patches/server/0007-Remove-method-profiler-callers.patch b/patches/server/0007-Remove-method-profiler-callers.patch index 513a43ab0..627c20760 100644 --- a/patches/server/0007-Remove-method-profiler-callers.patch +++ b/patches/server/0007-Remove-method-profiler-callers.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove method profiler callers diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 15450f36a40908e957cf3ee4e7e392989cdd3617..d9f9892880e894a3a4e7cabaef95b480d61b0ecc 100644 +index bacfc4cba6d127460d293ee32ef5e73707f03b97..8b65ff1ac5f81b2f0ac1cac4a5485e8f59472233 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -588,33 +588,33 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/scripts/apply.sh b/scripts/apply.sh index 558a26890..d5ba0167e 100755 --- a/scripts/apply.sh +++ b/scripts/apply.sh @@ -5,8 +5,6 @@ basedir=$1 source "$basedir/scripts/functions.sh" -. $basedir/functions.sh - paperVer=$(cat current-paper) gpgsign="$(git config commit.gpgsign || echo "false")" echo "Rebuilding Forked projects.... " diff --git a/scripts/push.sh b/scripts/push.sh index ed4bf9f00..6099dceff 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -1,15 +1,12 @@ #!/usr/bin/env bash + # get base dir regardless of execution location -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -. $(dirname $SOURCE)/init.sh +basedir=$1 + +source "$basedir/scripts/functions.sh" minecraftversion=$(cat $basedir/Paper/work/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) basedir -pushRepo ${FORK_NAME}-API $API_REPO master:$minecraftversion -pushRepo ${FORK_NAME}-Server $SERVER_REPO master:$minecraftversion +gitpush ${FORK_NAME}-API $API_REPO master:$minecraftversion +gitpush ${FORK_NAME}-Server $SERVER_REPO master:$minecraftversion diff --git a/scripts/rebuildpatches.sh b/scripts/rebuildpatches.sh index e09a74d14..0e023e1d7 100755 --- a/scripts/rebuildpatches.sh +++ b/scripts/rebuildpatches.sh @@ -1,14 +1,10 @@ #!/usr/bin/env bash -# get base dir regardless of execution location -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -. $(dirname $SOURCE)/init.sh -PS1="$" +# get base dir regardless of execution location +basedir=$1 + +source "$basedir/scripts/functions.sh" + echo "Rebuilding patch files from current fork state..." function savePatches { what=$1 @@ -40,4 +36,4 @@ function savePatches { savePatches ${FORK_NAME}-API api savePatches ${FORK_NAME}-Server server -$basedir/scripts/push.sh +$basedir/scripts/push.sh "$basedir"