From 7d32ecd906376956f01723a32cc1e39b3e9b9ab2 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 8 Apr 2018 17:01:59 +0200 Subject: [PATCH] install: Fix prefix confusion. * install.sh: Substitute @PREFIX@ with MES_PREFIX. * scripts/mescc.mes: Grok PREFIX as MES_PREFIX. --- install.sh | 5 ++++- scripts/mescc.mes | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 7c6a4f9b..6f5f4063 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,10 @@ cp libc-mes.hex2 $MES_PREFIX/lib/libc-mes.hex2 cp libc+tcc-mes.hex2 $MES_PREFIX/lib/libc+tcc-mes.hex2 cp scripts/mescc.mes $PREFIX/bin/mescc.mes -cp guile/mescc.scm $PREFIX/bin/mescc.scm +sed -e "s,@PREFIX@,$MES_PREFIX,g" \ + scripts/mescc.mes > $PREFIX/bin/mescc.mes +sed -e "s,@PREFIX@,$MES_PREFIX,g" \ + guile/mescc.scm > $PREFIX/bin/mescc.scm mkdir -p $MES_PREFIX tar -cf- doc guile include lib module scaffold stage0 | tar -xf- -C $MES_PREFIX diff --git a/scripts/mescc.mes b/scripts/mescc.mes index 0f78da77..082f45b4 100755 --- a/scripts/mescc.mes +++ b/scripts/mescc.mes @@ -7,12 +7,9 @@ if [ "$MES_PREFIX" = @PREFIX""@ ] then MES_PREFIX=$(cd $(dirname $0)/.. && pwd) export MES_PREFIX - MES_MODULEDIR=${MES_MODULEDIR-$MES_PREFIX/"module"} - export MES_MODULEDIR -else - MES_MODULEDIR=${MES_MODULEDIR-$MES_PREFIX/share/mes/"module"} - export MES_MODULEDIR fi +MES_MODULEDIR=${MES_MODULEDIR-$MES_PREFIX/"module"} +export MES_MODULEDIR echo '()' | cat $MES_MODULEDIR/mes/base-0.mes $0 /dev/stdin | $MES $MES_FLAGS -- "$@" #paredit:|| exit $?