mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 15:07:37 +03:00
b457d15701
Zsh is available by default on macOS readlink -f is commonly supported on Linux and BSD
16 lines
313 B
Bash
Executable File
Vendored
16 lines
313 B
Bash
Executable File
Vendored
#!/bin/sh
|
|
|
|
set -e # exit on any error
|
|
|
|
if [ "$(uname)" = Darwin ]; then
|
|
DIR=$(zsh -c 'printf %s "$0:A:h"' "$0")
|
|
else
|
|
DIR=$(dirname "$(readlink -f -- "$0")")
|
|
fi
|
|
|
|
LD_LIBRARY_PATH="$DIR/idris2_app":$LD_LIBRARY_PATH
|
|
PATH="$DIR/idris2_app":$PATH
|
|
export LD_LIBRARY_PATH PATH
|
|
|
|
"$DIR/idris2_app/idris2-boot" "$@"
|