summarylogtreecommitdiffstats
path: root/check4u
blob: 895b3807821fef55487cfd6eb6abc6ccbe9394b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
# ./check4u -- check for updates of a software package

fstar_latest() {
    local GITHUB_RELEASES='https://github.com/FStarLang/FStar/releases.atom'

    LATEST=`sed -e "s/xmlns/ignore/" <(curl --silent $GITHUB_RELEASES) |
        xmllint --xpath "/feed/entry[1]/title/text()" - | cut -d' ' -f1`
}
fstar_current() {
    source PKGBUILD &&
        CURRENT="v$pkgver"
}

fstar_latest && fstar_current

if [[ "$LATEST" != "$CURRENT" ]]; then
    echo -e "Latest release   : $LATEST"
    echo -e "Currently on AUR : $CURRENT"
    exit 1
fi