1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-10-13 14:03:47 +00:00
bips/scripts/link-format-chk.sh
viktorking7 664d376c8a CI: improve date validation regex in buildtable.pl
and quote filename variable in link format checker script

Co-authored-by: bigbear <155267841+aso20455@users.noreply.github.com>
Co-authored-by: Jon Atack <jon@atack.com>
2025-10-03 13:35:31 -06:00

21 lines
562 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Check wrong mediawiki link format
ECODE=0
for fname in *.mediawiki; do
GRES=$(grep -n '](http' "$fname")
if [ "$GRES" != "" ]; then
if [ $ECODE -eq 0 ]; then
>&2 echo "Github Mediawiki format writes link as [URL text], not as [text](url):"
fi
ECODE=1
echo "- $fname:$GRES"
fi
done
exit $ECODE