mirror of
https://github.com/hsoft/collapseos.git
synced 2025-04-11 15:38:15 +10:00
Fix for tools/zasm.sh being dependent on readlink -f (an issue on macOS, preventing builds)
This commit is contained in:
parent
e259e3d02e
commit
f0502a7a99
@ -1,7 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
# readlink -f doesn't work with macOS's implementation (BSD in general?)
|
||||||
|
# so, if we can't get readlink -f to work, try python with a realpath implementation
|
||||||
|
ABS_PATH=$(readlink -f "$0" || python -c "import sys, os; print(os.path.realpath('$0'))")
|
||||||
|
|
||||||
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
||||||
DIR=$(dirname $(readlink -f "$0"))
|
DIR=$(dirname "${ABS_PATH}")
|
||||||
ZASMBIN="${DIR}/emul/zasm/zasm"
|
ZASMBIN="${DIR}/emul/zasm/zasm"
|
||||||
CFSPACK="${DIR}/cfspack/cfspack"
|
CFSPACK="${DIR}/cfspack/cfspack"
|
||||||
INCCFS=$(mktemp)
|
INCCFS=$(mktemp)
|
||||||
|
Loading…
Reference in New Issue
Block a user