Mercurial > hg > LGDataverses
view scripts/api/data-deposit/publish-dataset @ 14:be7787c36e58 default tip
new: nofity LGSercies for deleted files
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 02 Nov 2015 16:41:23 +0100 |
parents | a50cf11e5178 |
children |
line wrap: on
line source
#!/bin/sh USERNAME=pete PASSWORD=pete DVN_SERVER=localhost:8181 if [ -z "$1" ]; then GLOBAL_ID=`scripts/api/data-deposit/list-datasets | xpath '//id/text()' | cut -d'/' -f11,12,13` else GLOBAL_ID=$1 #GLOBAL_ID=doi:10.5072/FK2/5555 fi # We cat /dev/null so that contentLength is zero. This makes headersOnly true:: https://github.com/swordapp/JavaServer2.0/blob/sword2-server-1.0/src/main/java/org/swordapp/server/ContainerAPI.java#L338 # 'to tell curl to read the format from stdin you write "@-"' -- http://curl.haxx.se/docs/manpage.html cat /dev/null | curl -s --insecure -X POST -H "In-Progress: false" --data-binary @- https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/$GLOBAL_ID \ | xmllint --format -