From 7603ee1f31a18ce12ddee1eb78b2a9df46591841 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 23 May 2018 20:28:43 +0200 Subject: [PATCH] build: Do not assume /bin/sh, basename/dirname. * install.sh: Do not assume /bin/sh, basename/dirname. * scripts/diff.scm: Likewise. --- install.sh | 6 +++--- scripts/diff.scm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 102fc00c..f8b24e18 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/scripts/diff.scm b/scripts/diff.scm index 74eef112..1ce3492a 100755 --- a/scripts/diff.scm +++ b/scripts/diff.scm @@ -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