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

acl_latest() {
    local GITHUB_RELEASES='https://github.com/acl2-devel/acl2-devel/releases.atom'

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

acl_latest && acl_current

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