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

mlkit_latest() {
    local GITHUB_RELEASES='https://github.com/melsman/mlkit/releases.atom'

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

mlkit_latest && mlkit_current

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