From 56705f6445fe43f95b7af26a6795a97139be5ae7 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Sun, 3 Apr 2016 03:35:51 -0500 Subject: [PATCH] Workaround for OSX not having the realpath command. --- scripts/applyPatches.sh | 2 +- scripts/build.sh | 2 +- scripts/decompile.sh | 2 +- scripts/importmcdev.sh | 2 +- scripts/init.sh | 2 +- scripts/makemcdevsrc.sh | 2 +- scripts/paperclip.sh | 4 ++-- scripts/rebuildPatches.sh | 2 +- scripts/remap.sh | 2 +- scripts/upstreamMerge.sh | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 697cec183a..d4ab2fbef1 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" echo "Rebuilding Forked projects.... " diff --git a/scripts/build.sh b/scripts/build.sh index 6066687483..0d08279820 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,7 +2,7 @@ ( set -e -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" (git submodule update --init && ./scripts/remap.sh "$basedir" && ./scripts/decompile.sh "$basedir" && ./scripts/init.sh "$basedir" && ./scripts/applyPatches.sh "$basedir") || ( echo "Failed to build Paper" diff --git a/scripts/decompile.sh b/scripts/decompile.sh index 2e6cd50d3d..e56736beb1 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) decompiledir="$workdir/$minecraftversion" diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 95cf075473..398e9a7402 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -5,7 +5,7 @@ set -e nms="net/minecraft/server" export MODLOG="" PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) diff --git a/scripts/init.sh b/scripts/init.sh index cf66b387ba..51110efb73 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) decompiledir="$workdir/$minecraftversion" diff --git a/scripts/makemcdevsrc.sh b/scripts/makemcdevsrc.sh index cbe17f920e..a83515abe5 100755 --- a/scripts/makemcdevsrc.sh +++ b/scripts/makemcdevsrc.sh @@ -4,7 +4,7 @@ set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$basedir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) decompiledir="$workdir/$minecraftversion" diff --git a/scripts/paperclip.sh b/scripts/paperclip.sh index c8d55bd847..071fe06cc2 100755 --- a/scripts/paperclip.sh +++ b/scripts/paperclip.sh @@ -2,7 +2,7 @@ ( set -e -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) paperjar="../../Paper-Server/target/paper-$mcver.jar" @@ -18,5 +18,5 @@ echo "" echo "" echo "" echo "Build success!" -echo "Copied final jar to "$(realpath "$basedir/paperclip.jar") +echo "Copied final jar to $(cd "$basedir" && pwd -P)/paperclip.jar" ) diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh index af7ed88f06..0bc21a87af 100755 --- a/scripts/rebuildPatches.sh +++ b/scripts/rebuildPatches.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" echo "Rebuilding patch files from current fork state..." git config core.safecrlf false diff --git a/scripts/remap.sh b/scripts/remap.sh index a5200a9154..5bccafb0ce 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat ${workdir}/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) minecrafthash=$(cat ${workdir}/BuildData/info.json | grep minecraftHash | cut -d '"' -f 4) diff --git a/scripts/upstreamMerge.sh b/scripts/upstreamMerge.sh index 77781b3025..9b05f170e7 100755 --- a/scripts/upstreamMerge.sh +++ b/scripts/upstreamMerge.sh @@ -3,7 +3,7 @@ ( set -e PS1="$" -basedir=$(realpath "$1") +basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" function update {