diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -37,6 +37,12 @@ sparql() { -D "${2:-install.rdf}" -r csv 2>/dev/null | tr -d '\r' | tail -n 1 | head -c -1 } +# Retrieve current compatibility information from install.rdf. +query-version() { + sparql "[] em:id '$2' ; em:${1}Version ?x" install.rdf +} + + pkgver() { cd $_gitname sparql '<urn:mozilla:install-manifest> em:version ?x' | tr - . @@ -66,7 +72,6 @@ for target in "${optdepends[@]}"; do done optdepends=() - version-range() { local emid=$(emid $1) echo "$1>$(version min $emid)" "$1<$(version max $emid)" @@ -81,9 +86,7 @@ emid() { } version() { - local version; - version=$(sparql "[] em:id '$2' ; em:${1}Version ?x" \ - "$srcdir/install.rdf" ) + local version="$(query-version $1 $2)" if [[ $version =~ ([[:digit:]]+).\* ]]; then if [[ $1 = max ]]; then echo $(( ${BASH_REMATCH[1]} + 1 )) |