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

latestVersion="$(
  curl 'http://git.videolan.org/?p=x264.git;a=shortlog;h=refs/heads/stable' 2> /dev/null | \
    grep '<i>[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}</i>' | \
    sed "s|^.*<i>\([[:digit:]]\{4\}\)-\([[:digit:]]\{2\}\)-\([[:digit:]]\{2\}\)</i>.*\$|\1\2\3|" | \
    sort -n | \
    tail -n1
  )"

#latestVersion="$(\
#  curl "http://ftp.videolan.org/pub/videolan/x264/snapshots/" 2> /dev/null | \
#    tr "\"" "\n" | \
#    grep "^x264-snapshot-[[:digit:]]\+-[[:digit:]]\+-stable.tar.bz2\$" | \
#    sed "s/^x264-snapshot-\([[:digit:]]\+\)-[[:digit:]]\+-stable.tar.bz2\$/\1/" | \
#    sort -n | \
#    tail -n1)"

echo -n "${latestVersion}"