mirror of https://github.com/linkerd/linkerd2.git
21 lines
450 B
Bash
Executable File
21 lines
450 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
set -eu
|
|
|
|
bindir=$( cd "${0%/*}" && pwd )
|
|
rootdir=$( cd "$bindir"/.. && pwd )
|
|
|
|
version=0.23.1
|
|
|
|
export PATH="$rootdir/node_modules/.bin:$PATH"
|
|
|
|
if ! command -v markdownlint >/dev/null || [ "$(markdownlint -V)" != "$version" ]; then
|
|
if ! [ -x "$(command -v npm)" ]; then
|
|
echo 'Error: npm required to install markdownlint command' >&2
|
|
exit 1
|
|
fi
|
|
npm install "markdownlint-cli@$version"
|
|
fi
|
|
|
|
markdownlint "$@"
|