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

latestVersion="$(\
  curl "http://ftp.videolan.org/pub/videolan/x265/" 2> /dev/null | \
    tr "\"" "\n" | \
    grep "^x265_[[:digit:]]\+\.[[:digit:]]\+\.tar\.gz\$" | \
    sed "s/^x265_\([[:digit:]]\+\.[[:digit:]]\+\)\.tar\.gz\$/\1/" | \
    sort -V | \
    tail -n1)"

echo -n "${latestVersion}"