mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-30 09:55:30 +02:00
check-pr: fix check_duplicates (#11954)
This commit is contained in:
parent
9bdadee54c
commit
36a50f5495
1 changed files with 3 additions and 3 deletions
|
@ -22,14 +22,14 @@
|
||||||
|
|
||||||
# Check for duplicated pages.
|
# Check for duplicated pages.
|
||||||
function check_duplicates {
|
function check_duplicates {
|
||||||
local page=$1 # page path in the format 'platform/pagename.md'
|
local page=$1 # page path in the format 'pages<.language_code>/platform/pagename.md'
|
||||||
local parts
|
local parts
|
||||||
local other
|
local other
|
||||||
|
|
||||||
readarray -td'/' parts < <(echo -n "$page")
|
readarray -td'/' parts < <(echo -n "$page")
|
||||||
|
|
||||||
local platform=${parts[0]}
|
local platform=${parts[1]}
|
||||||
local file=${parts[1]}
|
local file=${parts[2]}
|
||||||
|
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
common) # check if page already exists in other platforms
|
common) # check if page already exists in other platforms
|
||||||
|
|
Loading…
Add table
Reference in a new issue