From 632744725942731bb4d15021215f8b9b1042ae03 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Wed, 20 May 2020 04:10:29 +0200 Subject: [PATCH] Fix ./paper edit continue for Windows --- .gitignore | 1 + paper | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c9b74f786..b1e563f22 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ bin/ dist/ manifest.mf +/work/Temp/ work/1.* work/Minecraft work/BuildData diff --git a/paper b/paper index 99d41654c..19a673116 100755 --- a/paper +++ b/paper @@ -125,7 +125,8 @@ case "$1" in "e" | "edit") case "$2" in "s" | "server") - export PAPER_LAST_EDIT="$basedir/Paper-Server" + mkdir -p "$basedir/work/Temp" + echo "$basedir/Paper-Server" > "$basedir/work/Temp/PAPER_LAST_EDIT" cd "$basedir/Paper-Server" ( set -e @@ -136,7 +137,8 @@ case "$1" in ) ;; "a" | "api") - export PAPER_LAST_EDIT="$basedir/Paper-API" + mkdir -p "$basedir/work/Temp" + echo "$basedir/Paper-API" > "$basedir/work/Temp/PAPER_LAST_EDIT" cd "$basedir/Paper-API" ( set -e @@ -147,8 +149,8 @@ case "$1" in ) ;; "c" | "continue") - cd "$PAPER_LAST_EDIT" - unset PAPER_LAST_EDIT + cd "$( < "$basedir/work/Temp/PAPER_LAST_EDIT")" + rm -f "$basedir/work/Temp/PAPER_LAST_EDIT" ( set -e