Created
February 5, 2018 19:39
-
-
Save stefanvangastel/34ace6a697d2e7ac0fb07e9194b94b1a to your computer and use it in GitHub Desktop.
Download latest release of Draw.io as war file
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
#!/bin/bash | |
json=`curl -s -X GET https://api.github.com/repos/jgraph/drawio/tags` | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w 'name'` | |
version="$(echo $temp | cut -d\ -f3)" | |
curl -o "drawio-$version.war" -L https://github.com/jgraph/drawio/releases/download/$version/draw.war |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#!/bin/bash
OPS VS DEV!
version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/jgraph/drawio/releases/latest | awk -F/ '{print $NF}')
curl -o "drawio-$version.war" -L https://github.com/jgraph/drawio/releases/download/$version/draw.war