zed/script/check-links
Finn Evers 2328e18cac
Move some configuration files out of the repository root (#64303)
This PR cleans up the repository root a bit, moving some of the less
relevant config files into the `.config` folder and removing unused
ones.

Release Notes:

- N/A
2026-09-16 14:08:49 +00:00

32 lines
678 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Usage: $0 [local|all] [--help]"
echo " local Only check local links (default)"
echo " all Check all links including remote ones"
exit 1
}
check_mode="local"
if [ $# -eq 1 ]; then
case "$1" in
"local") check_mode="local" ;;
"all") check_mode="all" ;;
"--help") usage ;;
*) echo "Invalid argument: $1" && usage ;;
esac
else
usage
fi
cargo install lychee
cd "$(dirname "$0")/.."
if [ "$check_mode" = "all" ]; then
lychee --config .config/lychee.toml --no-progress './docs/src/**/*'
else
lychee --config .config/lychee.toml --exclude '^http' './docs/src/**/*'
fi
#