Mercurial > hg > LGDataverses
view scripts/search/tests/edit-dataset-finch1 @ 10:a50cf11e5178
Rewrite LGDataverse completely upgrading to dataverse4.0
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 08 Sep 2015 17:00:21 +0200 |
parents | |
children |
line wrap: on
line source
#!/bin/bash . scripts/search/export-keys FIRST_FINCH_ID=126 GET_VERSION_OUTPUT=`curl -s GET http://localhost:8080/api/datasets/$FIRST_FINCH_ID/versions/:draft?key=$FINCHKEY` echo $GET_VERSION_OUTPUT | jq .data > /tmp/old cp /tmp/old /tmp/new sed -i -e "s/Darwin's Finches/Darwins Galápagos Finches/" /tmp/new EDIT_OUTPUT=`curl -s -H "Content-type:application/json" -X PUT -d @/tmp/new http://localhost:8080/api/datasets/$FIRST_FINCH_ID/versions/:draft?key=$FINCHKEY` echo $EDIT_OUTPUT echo $EDIT_OUTPUT | jq .