mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 19:38:56 +08:00
scripts/wrong-filename: add exceptions for .2 and .3
This commit is contained in:
@@ -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:]')
|
||||
|
||||
Reference in New Issue
Block a user