summaryrefslogtreecommitdiff
path: root/uselessPorts/babl/lastVersion.sh
blob: 3d57c49c574bd44037f5adf14f51902f8b317ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

mainVer="$(
  curl 'https://ftp.gtk.org/pub/babl/' 2> /dev/null | \
    tr "<>" "\n\n" | \
    grep '^[0-9.]\+/$' | \
    sed 's|/$||' | \
    sort -V | \
    tail -n1
)"

curl "https://ftp.gtk.org/pub/babl/${mainVer}/" 2> /dev/null | \
  tr "<>" "\n\n" | \
  grep '^babl-[0-9.]\+\.tar\.bz2$' | \
  sed 's|^babl-\([0-9.]\+\)\.tar\.bz2$|\1|' | \
  sort -V | \
  tail -n1