diff --git a/INSTALL.md b/INSTALL.md index f3ee82544c..d2715ee3ba 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ The requirements are: - A Scheme compiler; either Chez Scheme (default), or Racket. - `bash`, with `realpath`. On Linux, you probably already have this. - On a Mac, you can install this with `brew install coreutils`. + On a macOS, you can install this with `brew install coreutils`. On FreeBSD, OpenBSD and NetBSD, you can install `realpath` and `GNU make` using a package manager. For instance, on OpenBSD you can install all of them with `pkg_add coreutils gmake` command. diff --git a/README.md b/README.md index 6741010114..83d8ed82b9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Idris 2 [![Documentation Status](https://readthedocs.org/projects/idris2/badge/?version=latest)](https://idris2.readthedocs.io/en/latest/?badge=latest) [![Windows Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-windows.yml/badge.svg)](https://github.com/idris-lang/Idris2/actions/workflows/ci-windows.yml) [![Ubuntu Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-ubuntu-combined.yml/badge.svg)](https://github.com/idris-lang/Idris2/actions/workflows/ci-ubuntu-combined.yml) -[![MacOS Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-macos-combined.yml/badge.svg)](https://github.com/idris-lang/Idris2/actions/workflows/ci-macos-combined.yml) +[![macOS Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-macos-combined.yml/badge.svg)](https://github.com/idris-lang/Idris2/actions/workflows/ci-macos-combined.yml) [![Nix Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-nix.yml/badge.svg)](https://github.com/idris-lang/Idris2/actions/workflows/ci-nix.yml) [Idris 2](https://idris-lang.org/) is a purely functional programming language diff --git a/docs/source/tutorial/starting.rst b/docs/source/tutorial/starting.rst index 9e842a1eb4..13b1815488 100644 --- a/docs/source/tutorial/starting.rst +++ b/docs/source/tutorial/starting.rst @@ -90,7 +90,7 @@ which you can run: $ ./build/exec/hello Hello world -(On Macos you may first need to install realpath: ```brew install coreutils```) +(On macOS you may first need to install realpath: ```brew install coreutils```) Please note that the dollar sign ``$`` indicates the shell prompt! Some useful options to the Idris command are: diff --git a/src/Compiler/Scheme/Chez.idr b/src/Compiler/Scheme/Chez.idr index f4fd621b4b..28f8bca6e0 100644 --- a/src/Compiler/Scheme/Chez.idr +++ b/src/Compiler/Scheme/Chez.idr @@ -377,7 +377,7 @@ startChezWinSh chez appdir target = unlines , "" , "set -e # exit on any error" , "" - , "DIR=$(dirname \"$(realpath \"$0\")\")" + , "DIR=$(dirname \"$(readlink -f -- \"$0\")\")" , "CHEZ=$(cygpath \"" ++ chez ++"\")" , "export PATH=\"$DIR/" ++ appdir ++ "\":$PATH" , "\"$CHEZ\" --script \"$DIR/" ++ target ++ "\" \"$@\"" diff --git a/src/Compiler/Scheme/ChezSep.idr b/src/Compiler/Scheme/ChezSep.idr index 46bd97b3ef..02f45b8aaa 100644 --- a/src/Compiler/Scheme/ChezSep.idr +++ b/src/Compiler/Scheme/ChezSep.idr @@ -78,7 +78,7 @@ startChezWinSh chez appDirSh targetSh = unlines , "" , "set -e # exit on any error" , "" - , "DIR=$(dirname \"$(realpath \"$0\")\")" + , "DIR=$(dirname \"$(readlink -f -- \"$0\")\")" , "CHEZ=$(cygpath \"" ++ chez ++"\")" , "export PATH=\"$DIR/" ++ appDirSh ++ "\":$PATH" , "\"$CHEZ\" --program \"$DIR/" ++ targetSh ++ "\" \"$@\"" diff --git a/src/Compiler/Scheme/Racket.idr b/src/Compiler/Scheme/Racket.idr index 7819a79b30..87b22d414e 100644 --- a/src/Compiler/Scheme/Racket.idr +++ b/src/Compiler/Scheme/Racket.idr @@ -354,7 +354,7 @@ startRacketWinSh racket appdir target = unlines , "" , "set -e # exit on any error" , "" - , "DIR=$(dirname \"$(realpath \"$0\")\")" + , "DIR=$(dirname \"$(readlink -f -- \"$0\")\")" , "export PATH=\"$DIR/" ++ appdir ++ "\":$PATH" , racket ++ "\"" ++ target ++ "\" \"$@\"" ] diff --git a/support/refc/prim.c b/support/refc/prim.c index da58e95b0f..038afd687b 100644 --- a/support/refc/prim.c +++ b/support/refc/prim.c @@ -75,7 +75,7 @@ Value *sysOS(void) #elif _WIN64 return (Value *)makeString("windows"); #elif __APPLE__ || __MACH__ - return (Value *)makeString("Mac OSX"); + return (Value *)makeString("macOS"); #elif __linux__ return (Value *)makeString("Linux"); #elif __FreeBSD__ diff --git a/tests/chez/chez016/run b/tests/chez/chez016/run index b9d754577d..19bd9f3ebf 100755 --- a/tests/chez/chez016/run +++ b/tests/chez/chez016/run @@ -1,6 +1,10 @@ # This test needs to run `idris2` from a sub-folder. Get the absolute path. -IDRIS2_EXEC="$(realpath "$1")" +if [ "$(uname)" = Darwin ]; then + IDRIS2_EXEC=$(zsh -c 'printf %s "$0:A"' "$1") +else + IDRIS2_EXEC="$(readlink -f -- "$1")" +fi cd "folder with spaces" || exit