c7af89c797
On operating systems where /bin/sh is not Bash, some scripts are invalid
because of bashisms, and building Lix fails with errors like this:
`render-manpage.sh: 3: set: Illegal option -o pipefail`
This modifies all scripts that use a `/bin/sh` shebang to `/usr/bin/env
bash`, including currently POSIX-compliant ones, to prevent any future
confusion.
Change-Id: Ia074cc6db42d40fc59a63726f6194ea0149ea5e0
26 lines
405 B
Bash
Executable file
26 lines
405 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
lowdown_args=
|
|
|
|
if [ "$1" = --out-no-smarty ]; then
|
|
lowdown_args=--out-no-smarty
|
|
shift
|
|
fi
|
|
|
|
[ "$#" = 4 ] || {
|
|
echo "wrong number of args passed" >&2
|
|
exit 1
|
|
}
|
|
|
|
title="$1"
|
|
section="$2"
|
|
infile="$3"
|
|
outfile="$4"
|
|
|
|
(
|
|
printf "Title: %s\n\n" "$title"
|
|
cat "$infile"
|
|
) | lowdown -sT man --nroff-nolinks $lowdown_args -M section="$section" -o "$outfile"
|