summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-08-15 09:25:37 +0200
committerAzul <azul@riseup.net>2013-08-28 12:51:41 +0200
commitfbe74fd5aef6e26070e9b10357604dda3bd2d842 (patch)
tree8990ed2d3ef34430cdb2255e8e300b3b25ab4468 /files
parent869ea732363afa238055c59baad5d5ca83c38024 (diff)
couch-doc-diff: diff of a document on the couch (feature 3485)
Added the bash script couch-doc-diff. It runs a diff between the content of the couch document specified as the first parameter and the second parameter. Diff returns 0 if there is no difference. This way you can tell the data is already on the couch. The diff will ignore changes to whitespaces as these are usually irrelevant for security json docs.
Diffstat (limited to 'files')
-rw-r--r--files/couch-doc-diff2
1 files changed, 2 insertions, 0 deletions
diff --git a/files/couch-doc-diff b/files/couch-doc-diff
new file mode 100644
index 0000000..964d312
--- /dev/null
+++ b/files/couch-doc-diff
@@ -0,0 +1,2 @@
+#!/bin/bash
+diff -w <(curl -s --netrc-file /etc/couchdb/couchdb.netrc $1 ) <(echo '$2')