From 4108dc5b6881973a946e1b02f203a10e5c2220e1 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 697cec183..d4ab2fbef 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 606668748..0d0827982 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 2e6cd50d3..e56736beb 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 95cf07547..398e9a740 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 cf66b387b..51110efb7 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 cbe17f920..a83515abe 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 c8d55bd84..071fe06cc 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 af7ed88f0..0bc21a87a 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 a5200a915..5bccafb0c 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 77781b302..9b05f170e 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 {