Mercurial > hg > LGDataverses
view scripts/search/create-users @ 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/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