diff options
author | Kajur, Harish (vk250x) <vk250x@att.com> | 2018-10-17 18:30:52 -0400 |
---|---|---|
committer | Kajur, Harish (vk250x) <vk250x@att.com> | 2019-03-13 17:32:00 -0400 |
commit | 4f13df142990d339811066de744957cd6c75f0e8 (patch) | |
tree | 65e18ada67e5c5fbdf2cfe6aad1e1a590bfa7d9d /aai-traversal | |
parent | 66309b15a0c1c458e2feb22db3bd3d4c13bd1a64 (diff) |
Modify updateQueryData to support debugging mode
Issue-ID: AAI-2262
Change-Id: I669aca4d63dc5ee535bece78b964bcd06aff4da2
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-traversal')
-rw-r--r-- | aai-traversal/src/main/scripts/install/updateQueryData.sh | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/aai-traversal/src/main/scripts/install/updateQueryData.sh b/aai-traversal/src/main/scripts/install/updateQueryData.sh index a5723d0..7b5d1b3 100644 --- a/aai-traversal/src/main/scripts/install/updateQueryData.sh +++ b/aai-traversal/src/main/scripts/install/updateQueryData.sh @@ -25,6 +25,10 @@ PROGNAME=$(basename $0) PROJECT_HOME=/opt/app/aai-traversal OUTFILE=$PROJECT_HOME/logs/misc/${PROGNAME}.log.$(date +\%Y-\%m-\%d) +if [ "$1" = "--debug" ]; then + set -x; +fi; + TS=$(date "+%Y-%m-%d %H:%M:%S") CHECK_USER="aaiadmin" @@ -49,7 +53,11 @@ echo "Begin putTool for widget $filename" | tee -a $OUTFILE vers=`grep model-invariant-id $filepath|cut -d':' -f2|cut -d'"' -f2` # last parameter will skip put if it exists resource=service-design-and-creation/models/model/$vers -$PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +if [ "$1" = "--debug" ]; then + bash -x $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +else + $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +fi; echo "End putTool for widget $filename" | tee -a $OUTFILE done @@ -62,7 +70,11 @@ echo "Begin putTool for named-query $filename" | tee -a $OUTFILE vers=`grep named-query-uuid $filepath|cut -d':' -f2|cut -d'"' -f2` # last parameter will skip put if it exists resource=service-design-and-creation/named-queries/named-query/$vers -$PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +if [ "$1" = "--debug" ]; then + bash -x $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +else + $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +fi; echo "End putTool for named-query $filename" | tee -a $OUTFILE done @@ -75,7 +87,11 @@ echo "Begin putTool for resource model $filename" | tee -a $OUTFILE vers=`grep model-invariant-id $filepath|cut -d':' -f2|cut -d'"' -f2` # last parameter will skip put if it exists resource=service-design-and-creation/models/model/$vers -$PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +if [ "$1" = "--debug" ]; then + bash -x $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +else + $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +fi; echo "End putTool for resource model $filename" | tee -a $OUTFILE done @@ -88,7 +104,11 @@ echo "Begin putTool for service model $filename" | tee -a $OUTFILE vers=`grep model-invariant-id $filepath|cut -d':' -f2|cut -d'"' -f2` # last parameter will skip put if it exists resource=service-design-and-creation/models/model/$vers -$PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +if [ "$1" = "--debug" ]; then + bash -x $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +else + $PROJECT_HOME/scripts/putTool.sh $resource $filepath 412 >> $OUTFILE 2>&1 || error_exit "$resource $filepath" $j +fi; echo "End putTool for service model $filename" | tee -a $OUTFILE done |