Created
February 1, 2009 16:01
-
-
Save mariuswilms/55890 to your computer and use it in GitHub Desktop.
This file contains 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
#!/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