From 1f583d9c9157390850a7737630f60832ced82374 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 8 Oct 2015 14:29:21 +0200 Subject: [docs] Add --delete to the couch-doc-update usage --- files/couch-doc-update | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'files') diff --git a/files/couch-doc-update b/files/couch-doc-update index fcf6f17..a137e7f 100644 --- a/files/couch-doc-update +++ b/files/couch-doc-update @@ -2,7 +2,7 @@ require 'syslog' # -# This script will update the values of a particular couchdb document. The benefit of this little script over +# This script will delete or update the values of a particular couchdb document. The benefit of this little script over # using a simple curl command for updating a document is this: # # * exit non-zero status if document was not updated. @@ -15,7 +15,9 @@ require 'syslog' # # USAGE # -# couch-doc-update --host --db --id --data [--file ] +# see the ouput of +# +# couch-doc-update # # the content of will be merged with the data provided. # If you only want the file content use --data '{}' @@ -28,7 +30,10 @@ require 'syslog' # update a user: # couch-doc-update --db _users --id org.couchdb.user:ca_daemon --data '{"password":"sssshhh"}' # -# To update the _users DB on bigcouch, you must connect to port 5986 instead of the default couchdb port 5984 +# To update the _users DB on bigcouch, you must connect to port 5986 instead of the default couchdb port 5984 +# +# delete a doc: +# couch-doc-update --delete --db invite_codes --id dfaf0ee65670c16d5a9161dc86f3bff8 # begin; require 'rubygems'; rescue LoadError; end # optionally load rubygems @@ -207,6 +212,7 @@ end def usage(s) $stderr.puts(s) $stderr.puts("Usage: #{File.basename($0)} --host --db --id --data [--file ] [--netrc-file ]") + $stderr.puts(" #{File.basename($0)} --host --db --id --delete [--netrc-file ]") exit(2) end -- cgit v1.2.3