Created
March 4, 2016 14:33
-
-
Save pwm/491dc2efc81c50dc75bd to your computer and use it in GitHub Desktop.
Turning plantuml .puml files to .svg
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
#!/usr/bin/env bash | |
PUML_RELATIVE_WORKING_DIR="diagrams/" | |
PUML_BIN=$(which plantuml 2>/dev/null) | |
######## | |
set -u # exit on unset var | |
set -e # exit on non-true return value | |
cd $(dirname ${BASH_SOURCE[0]})/.. # change to project root for relative paths | |
if [ -z "${PUML_BIN}" ]; then | |
echo "You need plantuml for this script." | |
echo "On a mac with homebrew: brew install plantuml" | |
exit | |
fi | |
echo "Turning .puml files to .svg in ${PUML_RELATIVE_WORKING_DIR} ..." | |
${PUML_BIN} -tsvg -o . ${PUML_RELATIVE_WORKING_DIR}* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment