mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
sync-ebooks: Don't rename repository if target directory already exists
This commit is contained in:
parent
1e32a97c7d
commit
4ef06e6443
1 changed files with 9 additions and 3 deletions
|
@ -255,9 +255,15 @@ printf "%s\n" "${repoUrls}" | while IFS= read -r repoUrl; do
|
||||||
# if for some reason the repository name isn't the same as the identifier (they are identical
|
# if for some reason the repository name isn't the same as the identifier (they are identical
|
||||||
# 99% of the time), rename the directory to be the identifier name; not sure why this is done, either
|
# 99% of the time), rename the directory to be the identifier name; not sure why this is done, either
|
||||||
if [ "${repoName}" != "${properName}" ]; then
|
if [ "${repoName}" != "${properName}" ]; then
|
||||||
if [ "${verbosity}" -gt 0 ]; then
|
if [ -d "${properName}" ]; then
|
||||||
printf "Moving %s to %s\n" "${repoName}" "${properName}"
|
if [ "${verbosity}" -gt 0 ]; then
|
||||||
|
printf "Not moving %s to %s: directory exists\n" "${repoName}" "${properName}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "${verbosity}" -gt 0 ]; then
|
||||||
|
printf "Moving %s to %s\n" "${repoName}" "${properName}"
|
||||||
|
fi
|
||||||
|
mv "${repoName}" "${properName}"
|
||||||
fi
|
fi
|
||||||
mv "${repoName}" "${properName}"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue