aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Schwarz <zeranoe@gmail.com>2023-01-29 21:09:31 -0500
committerKyle Schwarz <zeranoe@gmail.com>2023-01-29 21:09:31 -0500
commit648c3da5a9ade40a32b21290b2889c670d01380b (patch)
tree341a82a842eb21f31c81339419faeaa3d85774b8
parentc9911aa227736faf8a787a6cc99fb4fbd659966e (diff)
Avoid realpath for macOS
Closes #27
-rwxr-xr-xmingw-w64-build8
1 files 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"