-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmin-no-ldp-pcdm-create.sh
executable file
·31 lines (22 loc) · 1.31 KB
/
min-no-ldp-pcdm-create.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
curl -is -X PUT -H "Content-Type: text/turtle" --data-binary @$DIR/pcdm-collection.ttl $FEDORA_BASE/mnoldp > /dev/null
START=`date +%s`
COUNT=${START_COUNT:-0}
OBJECTS=${NUM_OBJS:-1000}
OBJECTS=$((OBJECTS + COUNT))
echo -n "MIN-NO-LDP CREATE $COUNT $OBJECTS "
while [ $COUNT -lt $OBJECTS ]; do
curl -is -X PUT -H "Content-Type: text/turtle" --data-binary @$DIR/pcdm-object.ttl $FEDORA_BASE/mnoldp/obj$COUNT > /dev/null
curl -is -X PUT -H "Content-Type: text/turtle" --data-binary @$DIR/pcdm-object.ttl $FEDORA_BASE/mnoldp/obj$COUNT/file0 > /dev/null
curl -is -X PUT -H "Content-Type: text/turtle" --data-binary @$DIR/pcdm-object.ttl $FEDORA_BASE/mnoldp/obj$COUNT/file1 > /dev/null
curl -is -X PUT $FEDORA_BASE/mnoldp/obj$COUNT/file0/data-file > /dev/null
curl -is -X PATCH -H "Content-Type: application/sparql-update" --data-binary @$DIR/original-file.ru $FEDORA_BASE/mnoldp/obj$COUNT/file0/data-file > /dev/null
curl -is -X PUT $FEDORA_BASE/mnoldp/obj$COUNT/file1/data-file > /dev/null
curl -is -X PATCH -H "Content-Type: application/sparql-update" --data-binary @$DIR/original-file.ru $FEDORA_BASE/mnoldp/obj$COUNT/file1/data-file > /dev/null
# echo "$COUNT"
COUNT=$(( COUNT + 1 ))
done
END=`date +%s`
TOTAL=$(( $END - $START ))
echo "$TOTAL"