test: Add a links checker and fix some links

This commit is contained in:
xlai89
2024-05-12 16:59:13 +02:00
committed by James Shubin
parent 09e53bfd3f
commit 201cf091d5
8 changed files with 32 additions and 7 deletions

View File

@@ -168,6 +168,15 @@ fold_end "Install golang tools"
fold_start "Install miscellaneous tools"
command -v mdl &>/dev/null || gem install mdl --no-document || true # for linting markdown files
command -v fpm &>/dev/null || gem install fpm --no-document || true # for cross distro packaging
# for checking links
LYCHEE=$(command -v lychee 2>/dev/null) || true
if [ -z "$LYCHEE" ]; then
LYCHEE_VERSION='v0.15.1' # current stable version
LYCHEE_TMP='/tmp/'
LYCHEE_FILE="${LYCHEE_TMP}lychee-${LYCHEE_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
wget "https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_VERSION}/lychee-${LYCHEE_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -O "$LYCHEE_FILE"
tar -C /usr/local/bin -xzvf "$LYCHEE_FILE"
fi
fold_end "Install miscellaneous tools"
cd "$XPWD" >/dev/null