Browse Source

Simply rmdir usage with --ignore-fail-on-non-empty

* suppress the unnecessary warning: Directory not empty
* remove the unnecessary comments because of the descriptive option name

Change-Id: I4899d5ddb0086dcb1ee82eb126f137242b7e0304
changes/66/253466/1
KATO Tomoyuki 6 years ago
parent
commit
05a6ce200c
  1. 9
      bin/doc-tools-check-languages

9
bin/doc-tools-check-languages

@ -247,24 +247,21 @@ function handle_draft_language {
case "${book}" in
config-reference)
mv publish-docs/$language/draft/$book publish-docs/draft/$language/$book
# Remove directory if it's empty and do not fail if it's non-empty
rmdir publish-docs/$language/draft || true
rmdir --ignore-fail-on-non-empty publish-docs/$language/draft
;;
firstapp)
for tag in libcloud dotnet fog openstacksdk pkgcloud shade; do
mv publish-docs/$language/$book-${tag} \
publish-docs/draft/$language/$book-${tag}
done
# Remove directory if it's empty and do not fail if it's non-empty
rmdir publish-docs/$language/ || true
rmdir --ignore-fail-on-non-empty publish-docs/$language/
;;
install-guide)
for tag in obs rdo ubuntu debian; do
mv publish-docs/$language/$book-${tag} \
publish-docs/draft/$language/$book-${tag}
done
# Remove directory if it's empty and do not fail if it's non-empty
rmdir publish-docs/$language/ || true
rmdir --ignore-fail-on-non-empty publish-docs/$language/
;;
*)
mv publish-docs/$language/$book publish-docs/draft/$language/$book

Loading…
Cancel
Save