aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/scripts/bulkprocess.sh
diff options
context:
space:
mode:
authorLaMont, William (wl2432) <wl2432@att.com>2020-06-26 17:24:51 -0400
committerLaMont, William (wl2432) <wl2432@att.com>2020-06-26 17:25:39 -0400
commit9666d712661e58fa4918f9c49d03fde6f4434e07 (patch)
tree575ea35b8ae09ec5a07acf5af212fe4fa91f94f3 /aai-resources/src/main/scripts/bulkprocess.sh
parent486d7f22a047b1465abc5a1365560ebf44c0e589 (diff)
support for v20
Issue-ID: AAI-2965 Change-Id: I87737d2cfcf6b499af6083c2355042d66278e73c Signed-off-by: LaMont, William (wl2432) <wl2432@att.com>
Diffstat (limited to 'aai-resources/src/main/scripts/bulkprocess.sh')
-rw-r--r--aai-resources/src/main/scripts/bulkprocess.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/aai-resources/src/main/scripts/bulkprocess.sh b/aai-resources/src/main/scripts/bulkprocess.sh
index c4bca27..7366bf2 100644
--- a/aai-resources/src/main/scripts/bulkprocess.sh
+++ b/aai-resources/src/main/scripts/bulkprocess.sh
@@ -29,12 +29,16 @@
inputFolder=$1
if [ -z "$1" ]; then
echo "Input folder string is empty."
- exit 1
+ exit 1
fi
-if [ ! -d "/opt/bulkprocess_load/$1" ]; then
- echo "Input folder could not be found."
- exit 1
+if [ ! -d "$inputFolder" ]; then
+ if [ ! -d "/opt/bulkprocess_load/$1" ]; then
+ echo "Input folder could not be found."
+ exit 1
+ else
+ inputFolder="/opt/bulkprocess_load/$1"
+ fi
fi
XFROMAPPID=$2
@@ -50,7 +54,7 @@ esac
XTRANSID=$3
-for input_file in $(ls -v /opt/bulkprocess_load/${inputFolder}/*);
+for input_file in $(ls -v ${inputFolder}/*);
do
output_file=$(basename $input_file | sed 's/.json//g');
/opt/app/aai-resources/scripts/putTool.sh /bulkprocess ${input_file} -display $XFROMAPPID $XTRANSID > /tmp/${output_file}.$(date +"%Y%m%d%H%M%S").results.json;