You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ja...@apache.org on 2021/06/30 12:41:19 UTC

[systemds] branch master updated: [MINOR] Robust check _images folder and set -e flag (#1332)

This is an automated email from the ASF dual-hosted git repository.

janardhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e6bddd  [MINOR] Robust check _images folder and set -e flag (#1332)
8e6bddd is described below

commit 8e6bddd24d28a38f3671ca3e2ff4e6319c09321e
Author: Janardhan Pulivarthi <j1...@protonmail.com>
AuthorDate: Wed Jun 30 18:10:30 2021 +0530

    [MINOR] Robust check _images folder and set -e flag (#1332)
---
 docs/updateAPI.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/docs/updateAPI.sh b/docs/updateAPI.sh
index 05841d1..3ce3195 100755
--- a/docs/updateAPI.sh
+++ b/docs/updateAPI.sh
@@ -20,6 +20,9 @@
 #
 #-------------------------------------------------------------
 
+# stop the script at first error
+set -e
+
 curFolder=${PWD##*/}
 
 if [ $curFolder != "docs" ]; then
@@ -49,7 +52,15 @@ else
     find . -type f -exec sed -i 's/_static/static/g' {} +
     mv _sources sources
     find . -type f -exec sed -i 's/_sources/sources/g' {} +
-    [[ -f "_images" ]] && mv _images images
-    find . -type f -exec sed -i 's/_images/images/g' {} +
+    
+    if [[ -d "_images" ]]
+    then
+      mv _images images
+      find . -type f -exec sed -i 's/_images/images/g' {} +
+    fi
+    
     cd ../../
 fi
+
+exit 0
+