Xcode build rule for Mardown files
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
# Template file with replacement tag: ${BODY} | |
TEMPLATE="${SRCROOT}/ShapeDemo/Template.html" | |
# generate and clean HTML | |
HTML_CONTENTS=`/usr/local/bin/markdown "${INPUT_FILE_PATH}"` | |
HTML_CONTENTS=`echo $HTML_CONTENTS | sed -e 's/[\/&]/\\\&/g'` | |
# replace into template and write to Resources | |
cat "$TEMPLATE" | sed "s/\${BODY}/${HTML_CONTENTS}/" > "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${INPUT_FILE_BASE}.html" | |
# output file | |
# $(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/$(INPUT_FILE_BASE).html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment