From 6738f46ead34e323257b08fff51c78d0b2ca9e08 Mon Sep 17 00:00:00 2001 From: Sotr Date: Mon, 13 Apr 2020 22:00:15 +0700 Subject: [PATCH] Never drop items on command "/give" --- akarin | 22 ++++++++++++++++++---- scripts/applyPatches.sh | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/akarin b/akarin index c8aae3037..d160ac13a 100755 --- a/akarin +++ b/akarin @@ -10,7 +10,7 @@ function setupUpstreamAndPatch { if [ "$1" != "skipPaper" ]; then $scriptdir/updateUpstream.sh "$basedir" 0 || exit 1 # not update submodule fi - $scriptdir/applyPatches.sh "$basedir" $2 || exit 1 + $scriptdir/applyPatches.sh "$basedir" || exit 1 } failed=0 @@ -25,13 +25,13 @@ case "$1" in "a" | "p" | "patch" | "apply") ( set -e - setupUpstreamAndPatch $2 "0" || exit 1 + setupUpstreamAndPatch $2 || exit 1 ) || failed=1 ;; "b" | "bu" | "build" | "install") ( set -e - setupUpstreamAndPatch $2 "0" || exit 1 + setupUpstreamAndPatch $2 || exit 1 basedir mvn -N install || exit 1 cd ${FORK_NAME}-API @@ -40,7 +40,7 @@ case "$1" in ;; "j" | "launcher" | "jar" | "paperclip") ( - setupUpstreamAndPatch $2 "0" || exit 1 + setupUpstreamAndPatch $2 || exit 1 basedir mvn -N install cd ${FORK_NAME}-API @@ -86,6 +86,13 @@ case "$1" in ( set -e gitstash + cd "$basedir/Paper/Paper-Server" + $gitcmd fetch --all + # Create the upstream branch in Paper project with current state + $gitcmd checkout master # possibly already in + $gitcmd branch -D upstream || true + $gitcmd branch -f upstream HEAD + cd "$basedir/Akarin-Server" $gitcmd rebase -i upstream/upstream gitunstash ) @@ -96,6 +103,13 @@ case "$1" in ( set -e gitstash + cd "$basedir/Paper/Paper-API" + $gitcmd fetch --all + # Create the upstream branch in Paper project with current state + $gitcmd checkout master # possibly already in + $gitcmd branch -D upstream || true + $gitcmd branch -f upstream HEAD + cd "$basedir/Akarin-API" $gitcmd rebase -i upstream/upstream gitunstash ) diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index de934f6e3..9a9fb9a57 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -41,7 +41,7 @@ function applyPatch { $gitcmd branch -D upstream >/dev/null &> /dev/null $gitcmd branch -f upstream "$branch" &> /dev/null && $gitcmd checkout upstream &> /dev/null - if [[ $needimport == "0" ]]; then + if [[ $needimport != "1" ]]; then if [ $baseproject != "${FORK_NAME}-API" ]; then echo " $(bashcolor 1 32)($5/$6)$(bashcolorend) - Import new introduced NMS files.." basedir && $scriptdir/importSources.sh $basedir 1 || exit 1