Skip to content

Commit

Permalink
Build on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita committed Jun 24, 2024
1 parent dacbd6a commit e701e36
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/Built/
.vscode
/run

.DS_Store
15 changes: 13 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ LZMA=0
PLATFORM=$(uname -s | head -c 5)
RUN=0

REALPATH_CMD="realpath"
# check if we are on macos
if [ "$PLATFORM" == "Darwi" ]; then
REALPATH_CMD="grealpath"
# check if grealpath exists
if ! command -v grealpath &> /dev/null; then
echo "grealpath not found, please install coreutils using 'brew install coreutils' and try again."
exit 1
fi
fi

while [[ $# -gt 0 ]]; do
key="$1"

Expand Down Expand Up @@ -103,10 +114,10 @@ BUILDDIR=""
function ADDFILE {
if [ $# -eq 1 ]; then
if [ -n "$BUILDDIR" ]; then
f="$(realpath --relative-to="./$BUILDDIR" "./${BUILDDIR}/${1}")"
f="$($REALPATH_CMD --relative-to="./$BUILDDIR" "./${BUILDDIR}/${1}")"

else
f="$(realpath --relative-to="." "./${1}")"
f="$($REALPATH_CMD --relative-to="." "./${1}")"

fi

Expand Down

0 comments on commit e701e36

Please sign in to comment.