From 648c3da5a9ade40a32b21290b2889c670d01380b Mon Sep 17 00:00:00 2001 From: Kyle Schwarz Date: Sun, 29 Jan 2023 21:09:31 -0500 Subject: Avoid realpath for macOS Closes #27 --- mingw-w64-build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mingw-w64-build b/mingw-w64-build index 3bf1e5b..e9ebda2 100755 --- a/mingw-w64-build +++ b/mingw-w64-build @@ -272,14 +272,14 @@ while :; do ;; -r|--root) if [ "$2" ]; then - ROOT_PATH=$(realpath "$2") + ROOT_PATH_ARG="$2" shift else arg_error "'--root' requires a non-empty option argument" fi ;; --root=?*) - ROOT_PATH=$(realpath "${1#*=}") + ROOT_PATH_ARG="${1#*=}" ;; --root=) arg_error "'--root' requires a non-empty option argument" @@ -411,6 +411,10 @@ fi TOTAL_STEPS=$((TOTAL_STEPS + THREADS_STEPS + BUILD_STEPS)) +if [ "$ROOT_PATH_ARG" ]; then + ROOT_PATH=$(mkdir -p "$ROOT_PATH_ARG" && cd "$ROOT_PATH_ARG" && pwd) +fi + SRC_PATH="$ROOT_PATH/src" BLD_PATH="$ROOT_PATH/bld" LOG_FILE="$ROOT_PATH/build.log" -- cgit v1.2.3