Created
February 4, 2015 13:26
-
-
Save joemaffia/87f8328eed1810a93260 to your computer and use it in GitHub Desktop.
Revisions
-
Joe Maffia created this gist
Feb 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash if (( $# < 1 )) then echo "You should add more stuff ;)" echo "example: $0 ~/Desktop/file.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"