Mercurial > hg > LGDataverses
diff scripts/search/create-users @ 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/search/create-users Tue Sep 08 17:00:21 2015 +0200 @@ -0,0 +1,19 @@ +#!/bin/bash +SERVER='http://localhost:8080/api' +BURRITO='burrito' +USERDIR='scripts/search/data/in/users' +OUTDIR='/tmp/searchusers' +rm -rf $OUTDIR +mkdir -p $OUTDIR + +create () { + pass=`cat $1 | jq .userName | tr -d \"` + echo $pass + resp=$(curl -s -H "Content-type:application/json" -X POST -d @$1 "$SERVER/builtin-users?password=$pass&key=$BURRITO") + echo $resp | jq . > $OUTDIR/$1 +} + +cd $USERDIR +for i in `ls`; do + create $i +done
