summaryrefslogtreecommitdiff
path: root/manualPorts/tinc/lastVersion.sh
blob: 582ca2cd3d352af90fcf6d5d74f8fa9a3df09844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

curl -Ss 'https://www.tinc-vpn.org/packages/' \
| sed '
  s@^.*<a href="\(tinc-\([0-9.]\+\)\.tar\.gz\)">\1</a>.*$@\2 normal \2@
  t
  s@^.*<a href="\(tinc-\(\([0-9.]\+\)pre\([0-9]\+\)\)\.tar\.gz\)">\1</a>.*$@\2 pre \3 \4@
  t
  d
' \
| sort -k3V,3 -k2r,2 -k4n,4 \
| cut -d' ' -f1 \
| tail -n1