diff scripts/exec-all-projects-docker.sh @ 390:d75786228e6b

INV-197 wire workflows backup into shared scripts
author Matt Calmes <calmes@ssdt-ohio.org>
date Mon, 25 Oct 2021 12:48:35 -0400
parents 23d40b345e1e
children 5d5525414c8d e97aa313253e
line wrap: on
line diff
--- a/scripts/exec-all-projects-docker.sh	Mon Oct 18 07:05:16 2021 -0400
+++ b/scripts/exec-all-projects-docker.sh	Mon Oct 25 12:48:35 2021 -0400
@@ -1,27 +1,17 @@
 #!/bin/bash
-# Scans for docker projects in specified parent path and
+# Scans for standard SSDT docker projects in specified parent path and
 # executes the specified command.
 #
-# The first parameter specifices theparent directory to search for 
-# docker-compose.yml # files must be specified.  #
+# The first parameter specifices the parent directory to search for. 
 # 
-# the second paramter specifies the command to execute against each
-# compose project.
+# The second parameter specifies the command to execute against each
+# SSDT standard docker project found under the parent directory.
 #
 # examples:
 #
-#   /ssdt/scripts/exec-all-projects.sh /data/prod docker-compose ps
-# 
-#     executes "docker-compose ps" against all projects under /data/prod
-#
-#   /ssdt/scripts/exec-all-projects.sh /data/prod /ssdt/ /ssdt/scripts/backup-usas.sh
+#   /ssdt/scripts/exec-all-projects-docker.sh /data/prod /ssdt/scripts/backup-inventory.sh
 #
-#     runs backup-usas.sh script against all projects under /data/prod
-#
-#   /ssdt/scripts/exec-all-projects.sh /data/prod "/ssdt/scripts/capture.sh | /ssdt/scripts/send.sh -"
-#
-#       captures the log files from all containers and sends one log file per project 
-#       to the SSDT support server.
+#     runs backup-inventory.sh script against all projects under /data/prod
 #
 ##
 
@@ -40,12 +30,13 @@
    projectdir=`dirname $f`
    project=`basename $projectdir`
    cd $projectdir
-   echo "projectdir is $projectdir"
-   echo -e "----\n$executing $COMMAND on $project \n----"      
+   if ls .env/ssdt-*-shared.properties 1> /dev/null 2>&1; then
+      echo "projectdir is $projectdir"
+      echo -e "----\n$executing $COMMAND on $project \n----"      
 
-   #bash -c "${COMMAND}"
-   echo ""
-
+      bash -c "${COMMAND}"
+      echo ""
+   fi
 done
 
 cd $ORIGINALDIR