summaryrefslogtreecommitdiff
path: root/portsToCome/libgd/lastVersion.sh
blob: cb712d6bada44fb22e4a1822d07027cfd1468e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

latestVersion="$(\
  curl "https://bitbucket.org/libgd/gd-libgd/downloads/" 2> /dev/null | \
  tr "\"" "\n" | \
  grep "^/libgd/gd-libgd/downloads/libgd-.*\.tar\.xz\$" | \
  sed "s|^/libgd/gd-libgd/downloads/libgd-\(.*\)\.tar\.xz\$|\1|" | \
  sort -V | \
  tail -n1)"

echo -n "${latestVersion}"