Skip to content

Instantly share code, notes, and snippets.

@JulianJorgensen
Created October 3, 2013 21:56
Show Gist options
  • Select an option

  • Save JulianJorgensen/6817766 to your computer and use it in GitHub Desktop.

Select an option

Save JulianJorgensen/6817766 to your computer and use it in GitHub Desktop.
sync-content summit
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