File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1515 type=$( jq -r ' .[0].type' ${BINDING_CONTEXT_PATH} )
1616 echo " Event: ${type} "
1717 if [[ $type == " Event" ]] ; then
18- /engine/add.sh $( jq -r -c ' .[0].object' ${BINDING_CONTEXT_PATH} )
18+ while IFS= read -r object; do
19+ /engine/add.sh " $object "
20+ done< <( jq -c ' .[].object' < ${BINDING_CONTEXT_PATH} )
1921 fi
2022fi
Original file line number Diff line number Diff line change 1616 echo " Event: ${type} "
1717 if [[ $type == " Synchronization" ]] ; then
1818 /engine/init-global-database.sh
19- count=$( jq -c ' .[0 ].objects | .[] | .object' ${BINDING_CONTEXT_PATH} | wc -l)
19+ count=$( jq -c ' .[].objects | .[] | .object' ${BINDING_CONTEXT_PATH} | wc -l)
2020 if [[ " $count " != " 0" ]] ; then
2121 echo " Synchronizing existing redis databases"
22- jq -c ' .[0].objects | .[] | .object' ${BINDING_CONTEXT_PATH} | tr ' \n' ' \0' | xargs -0 /engine/add.sh
22+ while IFS= read -r object; do
23+ /engine/add.sh " $object "
24+ done< <( jq -c ' .[].objects | .[] | .object' < ${BINDING_CONTEXT_PATH} )
2325 fi
2426 fi
2527fi
You can’t perform that action at this time.
0 commit comments