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

mainUrl='ftp://ftp.gnome.org/pub/GNOME/sources/gdl/'

mainVer="$( \
  curl "${mainUrl}" 2> /dev/null | \
    grep '^d' | \
    awk '{print $9}' | \
    grep '^[0-9.]\+$' | \
    sort -V | \
    tail -n1
)"

curl "${mainUrl}${mainVer}/" 2> /dev/null | \
  awk '{print $9}' | \
  grep '^gdl-[0-9.]\+\.tar\.xz$' | \
  sed 's|^gdl-\([0-9.]\+\)\.tar\.xz$|\1|' | \
  sort -V | \
  tail -n1