superlint/scripts/install-chktex.sh
Marco Ferrari 92e9cb3c85
build: fail on errors when installing chktex (#5214)
Refactor the chktex installation scripts because lists of commands don't
fail if one of them exits with an error, even if set -e (errexit) is
set.

See the Bash reference manual, section 4.3.1 'The Set Builtin'.
2024-02-05 10:31:43 +01:00

24 lines
375 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
apk add --no-cache --virtual .chktex-build-deps \
autoconf \
automake \
gcc \
git \
libc-dev \
libtool \
make
git clone https://git.savannah.gnu.org/git/chktex.git
cd chktex/chktex
./autogen.sh --prefix=/usr/bin
./configure
make
install chktex /usr/bin
rm -rfv /chktex
apk del --no-network --purge .chktex-build-deps