mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-23 19:54:50 +03:00
31 lines
587 B
Bash
31 lines
587 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e # exit on any error
|
||
|
|
||
|
if [ -z "$SCHEME" ]; then
|
||
|
echo "Required SCHEME env is not set."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
case $(uname -s) in
|
||
|
OpenBSD | FreeBSD | NetBSD)
|
||
|
REALPATH="grealpath"
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
REALPATH="realpath"
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
if ! command -v "$REALPATH" >/dev/null; then
|
||
|
echo "$REALPATH is required for Chez code generator."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
DIR=$(dirname "$($REALPATH "$0")")
|
||
|
LD_LIBRARY_PATH="$DIR/idris2_app":$LD_LIBRARY_PATH
|
||
|
PATH="$DIR/idris2_app":$PATH
|
||
|
export LD_LIBRARY_PATH PATH
|
||
|
|
||
|
${SCHEME} --script "$DIR/idris2_app/idris2-boot.so" "$@"
|