[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] a calling interface for shell scripts in groff
From: |
Bernd Warken |
Subject: |
[Groff] a calling interface for shell scripts in groff |
Date: |
Sat, 13 Jul 2002 22:02:08 +0200 |
User-agent: |
Mutt/1.2.5i |
Shell scripts run much faster and more compatible with the `ash' shell.
But as `ash' is not available at each system it cannot be provided by
the `#! /bin/ash' method. Are there any ideas about how this could be
solved?
I can imagine the following procedure, but I'm not yet happy with it.
1) Write a shell script `groff_sh' as follows:
#! /bin/sh
#
GROFF_SH='/bin/sh';
for i in $(echo -n "$PATH" | tr : ' '); do
if test -f "$i"'/ash' && test -x "$i"/ash; then
GROFF_SH="$i"'/ash';
break;
fi;
done;
"$GROFF_SH" "$@";
2) This is installed into $prefix/bin.
3) scripts like `grog.sh' or `groffer.sh' use `#! @BINDIR@/groff_sh'
as a first line and are transformed into `grog' and `groffer' by `make'.
Another possibility could add a `configure' test and require Debian, etc.
to install `ash'.
Bernd Warken
- [Groff] a calling interface for shell scripts in groff,
Bernd Warken <=
- Re: [Groff] a calling interface for shell scripts in groff, Colin Watson, 2002/07/13
- Re: [Groff] a calling interface for shell scripts in groff, Ralph Corderoy, 2002/07/13
- Re: [Groff] a calling interface for shell scripts in groff, Bernd Warken, 2002/07/14
- Re: [Groff] a calling interface for shell scripts in groff, Ralph Corderoy, 2002/07/14
- Re: [Groff] a calling interface for shell scripts in groff, Bernd Warken, 2002/07/14
- Re: [Groff] a calling interface for shell scripts in groff, Colin Watson, 2002/07/14
- Re: [Groff] a calling interface for shell scripts in groff, Bernd Warken, 2002/07/14
- Re: [Groff] a calling interface for shell scripts in groff, Werner LEMBERG, 2002/07/16
Re: [Groff] a calling interface for shell scripts in groff, Werner LEMBERG, 2002/07/14