Skip to content

Instantly share code, notes, and snippets.

@mariuswilms
Created February 1, 2009 16:01
Show Gist options
  • Save mariuswilms/55890 to your computer and use it in GitHub Desktop.
Save mariuswilms/55890 to your computer and use it in GitHub Desktop.
#!/bin/bash
CAKE_CORE_INCLUDE_PATH=/usr/local/share/cake-1.2.x.x
CAKE_CONSOLE=${CAKE_CORE_INCLUDE_PATH}/cake/console/cake
APP="/path/to/your/app"
MODELS="example attachments" # Models separated by one space
AUTO="-auto" # Enables automatic (destructive) repair!
if [ ! -x $CAKE_CONSOLE ] || [ ! -x $APP ]; then
exit 1
fi
for MODEL in $MODELS; do
$CAKE_CONSOLE media sync -app $APP -quiet $AUTO $MODEL
test $? != 0 && exit 1
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment