summarylogtreecommitdiffstats
path: root/check4u
blob: c4ce22279c39e55365d92bdc5a316c170af872c9 (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

fsharp_latest() {
    local GITHUB_RELEASES='https://github.com/fsharp/fsharp/releases.atom'

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

fsharp_latest && fsharp_current

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