mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-03 21:35:40 +02:00
scripts/wrong-filename: add exceptions for .2 and .3
This commit is contained in:
parent
345b5589c7
commit
1cc206bb94
1 changed files with 1 additions and 1 deletions
|
@ -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:]')
|
||||
|
|
Loading…
Add table
Reference in a new issue