diff --git a/tools/test-documentation b/tools/test-documentation index a8e9c3fdd2..46dfbb2c05 100755 --- a/tools/test-documentation +++ b/tools/test-documentation @@ -41,27 +41,17 @@ if [ -n "$skip_check_links" ]; then exit 0 fi -if [ -n "$skip_external_links" ]; then - color_message 94 "Testing only internal links in documentation..." - cd ../tools/documentation_crawler - set +e - scrapy crawl documentation_crawler -a skip_external=set "${loglevel[@]}" - # calling crawl directly as parameter needs to be passed - result=$? - if [ "$result" = 1 ]; then - color_message 91 "Failed!" - exit 1 - else - color_message 92 "Passed!" - exit 0 - fi -fi - -color_message 94 "Testing links in documentation..." - cd ../tools/documentation_crawler set +e -scrapy crawl_with_status documentation_crawler "${loglevel[@]}" +if [ -n "$skip_external_links" ]; then + color_message 94 "Testing only internal links in documentation..." + scrapy crawl_with_status documentation_crawler -a skip_external=set "${loglevel[@]}" + # calling crawl directly as parameter needs to be passed +else + color_message 94 "Testing links in documentation..." + scrapy crawl_with_status documentation_crawler "${loglevel[@]}" +fi + result=$? if [ "$result" = 1 ]; then color_message 91 "Failed!"