Created
September 2, 2012 12:03
-
-
Save jaanussiim/3597754 to your computer and use it in GitHub Desktop.
Script for automated mogeneration execution in Xcode
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
PATH_TO_MODELD="mTimer.xcdatamodeld" | |
OUTPUT_PATH="Classes" | |
type mogenerator >/dev/null 2>&1 || { | |
echo >&2 "warning: mogenerator not found. You will need it when changing core data model"; | |
exit 0; | |
} | |
CURRENT_VERSION=$(/usr/libexec/PlistBuddy -c "Print :_XCCurrentVersionName" "${PATH_TO_MODELD}/.xccurrentversion") | |
MODEL_PATH="${PATH_TO_MODELD}/${CURRENT_VERSION}" | |
echo "Used model path ${MODEL_PATH}" | |
mogenerator -m $MODEL_PATH -O $OUTPUT_PATH --template-var arc=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment