Skip to content

Commit

Permalink
CLI script renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Oct 30, 2023
1 parent 702e075 commit 9e5ab26
Show file tree
Hide file tree
Showing 37 changed files with 39 additions and 120 deletions.
2 changes: 1 addition & 1 deletion http-tests/admin/acl/add-put-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ popd > /dev/null

pushd . && cd "$SCRIPT_ROOT"

root_ntriples=$(./get-document.sh \
root_ntriples=$(./get.sh \
-f "$OWNER_CERT_FILE" \
-p "$OWNER_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/admin/acl/add-put-class-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ popd > /dev/null

pushd . && cd "$SCRIPT_ROOT"

root_ntriples=$(./get-document.sh \
root_ntriples=$(./get.sh \
-f "$OWNER_CERT_FILE" \
-p "$OWNER_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/admin/acl/add-put-group-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ popd > /dev/null

pushd . && cd "$SCRIPT_ROOT"

root_ntriples=$(./get-document.sh \
root_ntriples=$(./get.sh \
-f "$OWNER_CERT_FILE" \
-p "$OWNER_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/admin/model/create-property-constraint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ turtle+="_:item sioc:has_container <${END_USER_BASE_URL}> .\n"

response=$(echo -e "$turtle" \
| turtle --base="$END_USER_BASE_URL" \
| ./put-document.sh \
| ./put.sh \
-f "$OWNER_CERT_FILE" \
-p "$OWNER_CERT_PWD" \
--content-type "text/turtle" \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/document-hierarchy/PUT-new-no-type.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pushd . > /dev/null && cd "$SCRIPT_ROOT"

# check that a default RDF type was assigned to the new document

./get-document.sh \
./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/document-hierarchy/create-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ container=$(./create-container.sh \

# check that the item was created at the expected URL and attached to the document hierarchy

./get-document.sh \
./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/document-hierarchy/create-item.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ item=$(./create-item.sh \

# check that the item was created at the expected URL and attached to the document hierarchy

./get-document.sh \
./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/document-hierarchy/uploads/POST-rdf-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ curl -w "%{http_code}\n" -o /dev/null -v -k \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

doc_ntriples=$(./get-document.sh \
doc_ntriples=$(./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/document-hierarchy/uploads/POST-rdf-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ echo -e "$rdf_post" \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

doc_ntriples=$(./get-document.sh \
doc_ntriples=$(./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/imports/GET-file-range.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ popd > /dev/null

pushd . > /dev/null && cd "$SCRIPT_ROOT"

file_doc_ntriples=$(./get-document.sh \
file_doc_ntriples=$(./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/imports/GET-file-sha1sum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ popd > /dev/null

pushd . > /dev/null && cd "$SCRIPT_ROOT"

file_doc_ntriples=$(./get-document.sh \
file_doc_ntriples=$(./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/imports/create-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ file_doc=$(./create-file.sh \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

file_doc_ntriples=$(./get-document.sh \
file_doc_ntriples=$(./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/misc/admin-webid-delegation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pushd . > /dev/null && cd "$SCRIPT_ROOT"

# check that the acl:delegates triple exists in the agent's description

./get-document.sh \
./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion http-tests/misc/webid-delegation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pushd . > /dev/null && cd "$SCRIPT_ROOT"

# check that the acl:delegates triple exists in the agent's description

./get-document.sh \
./get.sh \
-f "$AGENT_CERT_FILE" \
-p "$AGENT_CERT_PWD" \
--accept 'application/n-triples' \
Expand Down
2 changes: 1 addition & 1 deletion scripts/admin/acl/create-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ if [ -n "$write" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/acl/create-group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ do
done

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-class.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ do
done

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-construct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-ontology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-property-constraint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-restriction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ if [ -n "$has_value" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/admin/model/create-select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../../create-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/create-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ if [ -n "$description" ] ; then
turtle+="<${parent}${encoded_slug}/> dct:description \"${description}\" .\n"
fi

echo -e "$turtle" | turtle --base="$base" | ./put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/create-generic-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ./put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/create-item.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ if [ -n "$description" ] ; then
fi


echo -e "$turtle" | turtle --base="$base" | ./put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/create-result-set-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ./put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/create-select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ./put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}"
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/imports/create-csv-import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/imports/create-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ if [ -n "$description" ] ; then
fi

# POST RDF/POST multipart form from stdin to the server
echo -e "$rdf_post" | curl -s -k -X PUT -H "Accept: text/turtle" -E "$cert_pem_file":"$cert_password" --config - "$target" -v -D - | tr -d '\r' | sed -En 's/^Location: (.*)$/\1/p'
echo -e "$rdf_post" | curl -w '%{url_effective}\n' -k -X PUT -H "Accept: text/turtle" -E "$cert_pem_file":"$cert_password" -o /dev/null "$target"
2 changes: 1 addition & 1 deletion scripts/imports/create-query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}"
2 changes: 1 addition & 1 deletion scripts/imports/create-rdf-import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ if [ -n "$fragment" ] ; then
fi

# submit Turtle doc to the server
echo -e "$turtle" | turtle --base="$base" | ../put-document.sh "${args[@]}"
echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}"
4 changes: 2 additions & 2 deletions scripts/imports/import-csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ query_doc=$(./create-query.sh \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

query_ntriples=$(./get-document.sh \
query_ntriples=$(./get.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
Expand All @@ -177,7 +177,7 @@ file_doc=$(./create-file.sh \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

file_ntriples=$(./get-document.sh \
file_ntriples=$(./get.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/imports/import-rdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if [ -n "$query_file" ] ; then

pushd . > /dev/null && cd "$SCRIPT_ROOT"

query_ntriples=$(./get-document.sh \
query_ntriples=$(./get.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
Expand All @@ -182,7 +182,7 @@ file_doc=$(./create-file.sh \

pushd . > /dev/null && cd "$SCRIPT_ROOT"

file_ntriples=$(./get-document.sh \
file_ntriples=$(./get.sh \
-f "$cert_pem_file" \
-p "$cert_password" \
--proxy "$proxy" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-document.sh → scripts/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ if [ -n "$proxy" ]; then
target="${target/$target_host/$proxy_host}"
fi

# POST RDF document from stdin to the server and print Location URL
cat - | curl -v -k -E "$cert_pem_file":"$cert_password" -d @- -H "Content-Type: ${content_type}" -H "Accept: text/turtle" "$target" -v -D - | tr -d '\r' | sed -En 's/^Location: (.*)/\1/p'
# POST RDF document from stdin to the server and print request URL
cat - | curl -w '%{url_effective}\n' -k -E "$cert_pem_file":"$cert_password" -d @- -H "Content-Type: ${content_type}" -H "Accept: text/turtle" -o /dev/null "$target"
4 changes: 2 additions & 2 deletions scripts/put-document.sh → scripts/put.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ if [ -n "$proxy" ]; then
target="${target/$target_host/$proxy_host}"
fi

# POST RDF document from stdin to the server and print Location URL
cat - | curl -v -k -E "$cert_pem_file":"$cert_password" -d @- -X PUT -H "Content-Type: ${content_type}" -H "Accept: text/turtle" "$target" -v -D - | tr -d '\r' | sed -En 's/^Location: (.*)/\1/p'
# POST RDF document from stdin to the server and print request URL
cat - | curl -w '%{url_effective}\n' -k -E "$cert_pem_file":"$cert_password" -d @- -X PUT -H "Content-Type: ${content_type}" -H "Accept: text/turtle" -o /dev/null "$target"
Loading

0 comments on commit 9e5ab26

Please sign in to comment.