Skip to content

Commit

Permalink
Update bigfix_newest_version.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed May 23, 2016
1 parent 9f2c707 commit a83133f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bash/bigfix_newest_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ download_file () {

if [ -n "$1" ]; then
download_file $1
# TODO: this currently only handles the format `>version<` but could also handle `"version"` or similar.
# it is extremeley difficult to build a regex that could handle all versions reliably.
echo `cat $HTMLTMPFILE | grep -o -P -e '>\d{1,2}\.\d{1,2}\.?\d*\.?\d*<' | grep -o -P -e '\d{1,2}\.\d{1,2}\.?\d*\.?\d*' | sort -r -V | grep -m 1 -i "."`
else
download_file http://support.bigfix.com/bes/release/index.html
Expand Down

0 comments on commit a83133f

Please sign in to comment.