scripts/wrong-filename: add exceptions for .2 and .3

This commit is contained in:
Sebastiaan Speck
2025-05-08 13:40:57 +02:00
committed by GitHub
parent 345b5589c7
commit 1cc206bb94
+1 -1
View File
@@ -17,7 +17,7 @@ set -e
# Iterate through all Markdown files in the 'pages' directories
find pages* -name '*.md' -type f | while read -r path; do
# Extract the expected command name from the filename
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | sed 's/\.2//' | sed 's/\.3//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
# Extract the command name from the first line of the Markdown file
COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | sed 's/--//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')