From b678abbce72a035286f03adf20d0add483121698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 19 Feb 2020 17:24:12 +0700 Subject: [PATCH] Allow to run chibi-run from anywhere chibi-run script assumes $(PWD) is at topdir. Let's remove that assumption so that the script can be used anywhere to launch chibi from dev environment. --- tools/chibi-run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/chibi-run b/tools/chibi-run index aceb1a3c..f40746ae 100755 --- a/tools/chibi-run +++ b/tools/chibi-run @@ -1 +1,3 @@ -LD_LIBRARY_PATH=.: DYLD_LIBRARY_PATH=.: CHIBI_MODULE_PATH=lib ./chibi-scheme "$@" +#!/bin/sh +DIR="$(dirname "$0")/.." +LD_LIBRARY_PATH="$DIR": DYLD_LIBRARY_PATH="$DIR": CHIBI_MODULE_PATH="$DIR"/lib "$DIR"/chibi-scheme "$@"