Skip to content

Instantly share code, notes, and snippets.

@saml
Created June 30, 2011 16:03
Show Gist options
  • Save saml/1056547 to your computer and use it in GitHub Desktop.
Save saml/1056547 to your computer and use it in GitHub Desktop.
#!/bin/bash
if (( $# < 1 ))
then
echo "Usage: $0 json url [cred, default=admin:admin]"
echo "example: $0 /tmp/content.tidy.-1.json http://localhost:4502/content/copy"
exit 1
fi
j="$1"
url="$2"
cred="${3:-admin:admin}"
curl -u "$cred" -F":operation=import" -F":contentType=json" -F":replace=true" -F":replaceProperties=true" -F":contentFile=@$j" "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment