mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 14:20:29 -04:00
Check truncated repo names properly even when they end in .git
This commit is contained in:
parent
a64adf4b1d
commit
4bfd85ffbf
1 changed files with 2 additions and 2 deletions
|
@ -215,9 +215,9 @@ printf "%s\n" "${repoUrls}" | while IFS= read -r repoUrl; do
|
|||
|
||||
# if the repository name has been truncated due to GitHub's name length limits,
|
||||
# but a local clone with the full name exists, don't attempt to clone it again
|
||||
repoNameLength=$(printf "%s" "${repoName}" | wc -m)
|
||||
repoNameLength=$(printf "%s" "${repoName%.git}" | wc -m)
|
||||
if [ "${repoNameLength}" -ge 100 ]; then
|
||||
if dirs=( "${repoName}"*/ ) && [[ -d ${dirs[0]} ]]; then
|
||||
if dirs=( "${repoName%.git}"*/ ) && [[ -d ${dirs[0]} ]]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue