install: Fix prefix confusion.

* install.sh: Substitute @PREFIX@ with MES_PREFIX.
* scripts/mescc.mes: Grok PREFIX as MES_PREFIX.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-08 17:01:59 +02:00
parent 87302af14e
commit 7d32ecd906
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 6 additions and 6 deletions

View file

@ -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 libc+tcc-mes.hex2 $MES_PREFIX/lib/libc+tcc-mes.hex2
cp scripts/mescc.mes $PREFIX/bin/mescc.mes 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 mkdir -p $MES_PREFIX
tar -cf- doc guile include lib module scaffold stage0 | tar -xf- -C $MES_PREFIX tar -cf- doc guile include lib module scaffold stage0 | tar -xf- -C $MES_PREFIX

View file

@ -7,12 +7,9 @@ if [ "$MES_PREFIX" = @PREFIX""@ ]
then then
MES_PREFIX=$(cd $(dirname $0)/.. && pwd) MES_PREFIX=$(cd $(dirname $0)/.. && pwd)
export MES_PREFIX 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 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 -- "$@" echo '()' | cat $MES_MODULEDIR/mes/base-0.mes $0 /dev/stdin | $MES $MES_FLAGS -- "$@"
#paredit:|| #paredit:||
exit $? exit $?