summaryrefslogtreecommitdiffstats
path: root/server/bin/oglivecli
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-01-30 09:10:02 +0000
committerramon <ramongomez@us.es>2017-01-30 09:10:02 +0000
commitb6e2f162587fd5bbefebe14e1e5d691ac2b0e102 (patch)
treeed3d422ec81528744cf482d86854719ae031bffa /server/bin/oglivecli
parent88f66f2b178f066ff6fe33d4b45436d404e4e681 (diff)
#768: Comparación de objetos JSON para inserción o actualización.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5164 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'server/bin/oglivecli')
-rwxr-xr-xserver/bin/oglivecli2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bin/oglivecli b/server/bin/oglivecli
index 54c8d156..d1e02a6a 100755
--- a/server/bin/oglivecli
+++ b/server/bin/oglivecli
@@ -37,7 +37,7 @@ EOT
# Check if ogLive is defined into JSON file.
n=$(jq ".oglive | length" $INFOFILE)
for ((i=0; i<n; i++)); do
- [ "$DATA" == "$(jq ".oglive[$i]" $INFOFILE)" ] && INDEX=$i
+ [ "$(jq ".check=$DATA | .check==.oglive[$i]" $INFOFILE)" ] && INDEX=$i
done
# Check if it needs to insert data.
if [ -z "$INDEX" ]; then