Created
October 3, 2013 21:56
-
-
Save JulianJorgensen/6817766 to your computer and use it in GitHub Desktop.
sync-content summit
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 characters
| function sync-content | |
| { | |
| echo "WARNING: This will sync ALL components (i.e. copy) from $2 to $3 for $1." | |
| read -p "Are you sure you want to continue? (y/n)" -n 1 choice | |
| echo | |
| if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then | |
| # sync the content | |
| echo "Syncing content from $2 to $3 for $1..." | |
| curl \ | |
| -F":operation=copy" \ | |
| -F":replace=true" \ | |
| -F":dest=/content/conference/$1-$3" \ | |
| -s -o /dev/null -w "%{http_code}" \ | |
| http://admin:[email protected]:4502/content/conference/$1-$2 | |
| else | |
| echo "Roger that. Nothing has been synced." | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment