build: Do not assume /bin/sh, basename/dirname.

* install.sh: Do not assume /bin/sh, basename/dirname.
* scripts/diff.scm: Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2018-05-23 20:28:43 +02:00
parent 0ba240a4e0
commit 7603ee1f31
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ DOCDIR=${MODULEDIR-$PREFIX/share/doc/mes}
chmod +w $PREFIX/bin/mescc
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
-e "s,^#! /bin/sh,#! $SHELL," \
-e "s,module/,$MODULEDIR/," \
-e "s,@DATADIR@,$DATADIR,g" \
-e "s,@DOCDIR@,$DOCDIR,g" \
@ -41,7 +41,7 @@ sed \
scripts/mescc > $PREFIX/bin/mescc
chmod +w $MODULEDIR/mes/boot-0.scm
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
-e "s,^#! /bin/sh,#! $SHELL," \
-e "s,module/,$MODULEDIR/," \
-e "s,@DATADIR@,$DATADIR,g" \
-e "s,@DOCDIR@,$DOCDIR,g" \
@ -54,5 +54,5 @@ sed \
cp scripts/diff.scm $PREFIX/bin/diff.scm
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
-e "s,^#! /bin/sh,#! $SHELL," \
scripts/diff.scm > $PREFIX/bin/diff.scm

View File

@ -4,7 +4,7 @@ mes_p=$(command -v mes)
if [ "$mes_p" -a -z "$MES" ]; then
MES=guile
fi
exec ${MES-mes} -L $(dirname 0) -e '(diff)' -s "$0" "$@"
exec ${MES-mes} -L ${0%/*} -e '(diff)' -s "$0" "$@"
!#
;;; Mes --- Maxwell Equations of Software