summaryrefslogtreecommitdiff
path: root/manualPorts/dd-resume/lastVersion.sh
blob: 9d13169201f1a2be50cf5f3bf7a814a4c2a6daec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

name=$(basename "$(readlink -f "${0%/*}")")

curl -Ss "https://git.eckner.net/Erich/${name}/refs/" | \
  tr '<>' '\n' | \
  sed -n "
    s,^a href='/Erich/${name}/snapshot/${name}-\([0-9.]\+\)\.tar\.xz'$,\1,
    T
    p
  " | \
  sort -V | \
  tail -n1