Skip to content

Instantly share code, notes, and snippets.

@ronaldtse
Last active October 24, 2018 10:03
Show Gist options
  • Save ronaldtse/8be50372781b0e64929004c29a6dc325 to your computer and use it in GitHub Desktop.
Save ronaldtse/8be50372781b0e64929004c29a6dc325 to your computer and use it in GitHub Desktop.
Install PlantUML on Ubuntu
# Install PlantUML
PLANTUML_URL="${PLANTUML_URL:-http://sourceforge.net/projects/plantuml/files/plantuml.jar/download}"
apt-get install -y default-jre
if [ -f "/opt/plantuml/plantuml.jar" ]; then
echo '[plantuml] PlantUML already installed.'
else
echo '[plantuml] Installing PlantUML...'
apt-get install -y graphviz
mkdir -p /opt/plantuml && \
curl -o /opt/plantuml/plantuml.jar \
-L ${PLANTUML_URL}
printf '#!/bin/sh\nexec java -jar /opt/plantuml/plantuml.jar "$@"' > /usr/bin/plantuml
chmod +x /usr/bin/plantuml
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment