build: Do not assume /bin/sh, basename/dirname.
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 23 May 2018 18:28:43 +0000 (20:28 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 23 May 2018 18:32:37 +0000 (20:32 +0200)
* install.sh: Do not assume /bin/sh, basename/dirname.
* scripts/diff.scm: Likewise.

install.sh
scripts/diff.scm

index 102fc00ca63e4ec2aaee3dca1e333178ad24798f..f8b24e183d65e252a456ba52db56bf9f5a7b9fd6 100755 (executable)
@@ -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
index 74eef11264dcd2907788b87859b096efd8c8029c..1ce3492a163e9b649791843e0b18dc788a5d9dd8 100755 (executable)
@@ -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