Skip to content

Instantly share code, notes, and snippets.

@carlossless
Created April 11, 2015 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlossless/e3cb6ab773dd515af218 to your computer and use it in GitHub Desktop.
Save carlossless/e3cb6ab773dd515af218 to your computer and use it in GitHub Desktop.
Data and Resource Model Regeneration Xcode scripts
PATH=/usr/local/bin/:${PATH}
if command -v mogenerator >/dev/null 2>&1; then
mogenerator --v2 --model "$SRCROOT"/TeamApp/Database/TeamApp.xcdatamodeld --human-dir "$SRCROOT"/TeamApp/Database/Models --machine-dir "$SRCROOT"/TeamApp/Database/Models/Generated
else
echo "warning: You have to install and set up mogenerator to generate the data models"
fi
PATH=/usr/local/bin/:${PATH}
if command -v xcres >/dev/null 2>&1; then
xcres --no-ansi build "$PROJECT_FILE_PATH" "$SRCROOT"/TeamApp/Resources/R
else
echo "warning: You have to install and set up xcres to generate the resource (R) struct"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment