Mercurial > hg > LGDataverses
comparison 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 |
comparison
equal
deleted
inserted
replaced
9:5926d6419569 | 10:a50cf11e5178 |
---|---|
1 #!/bin/bash | |
2 SERVER='http://localhost:8080/api' | |
3 BURRITO='burrito' | |
4 USERDIR='scripts/search/data/in/users' | |
5 OUTDIR='/tmp/searchusers' | |
6 rm -rf $OUTDIR | |
7 mkdir -p $OUTDIR | |
8 | |
9 create () { | |
10 pass=`cat $1 | jq .userName | tr -d \"` | |
11 echo $pass | |
12 resp=$(curl -s -H "Content-type:application/json" -X POST -d @$1 "$SERVER/builtin-users?password=$pass&key=$BURRITO") | |
13 echo $resp | jq . > $OUTDIR/$1 | |
14 } | |
15 | |
16 cd $USERDIR | |
17 for i in `ls`; do | |
18 create $i | |
19 done |