diff options
author | XZS | 2016-08-11 11:53:36 +0200 |
---|---|---|
committer | XZS | 2016-08-11 11:59:29 +0200 |
commit | 2994e9515945fa3706e5de7b31637ab1e9356a6e (patch) | |
tree | 6b5fb48516fed9d7fca1ce8477d4436b0f2035fe | |
parent | 88c3899ec7da1d3762df1faad2099ba53cced00a (diff) | |
download | aur-2994e9515945fa3706e5de7b31637ab1e9356a6e.tar.gz |
find version using XML
In the new site, the version has a fixed place in the layout. Fetching
it from there is more secure than fishing it out of the free text
description field.
-rw-r--r-- | PKGBUILD | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -24,11 +24,11 @@ sha256sums=('f5bbb7ea941d120d03237a28d07411aafc23e866b184083e37e02eda65aa3072' DLAGENTS=("version::/usr/bin/bash -c $( printf '%s\n' "${DLAGENTS[@]}" | sed -n 's/http::\(.*\)/\1/p' \ | sed 's/-[^ ] %o //' | sed 's/ /\\ /g' | sed 's/%u/$(echo\\ %u\\ |\\ sed\\ "s\/^version\/http\/")/' -)\ |\ grep\ -Po\ -m1\ '(?<=Gnome\ )[[:digit:].]+(?=\ Theme)'\ >\ %o" +)\ |\ xmllint\ --html\ --xpath\ 'normalize-space(//span[@class=\"value\"][1]/text())'\ -\ 2>/dev/null\ >\ %o" "${DLAGENTS[@]}") pkgver() { - tr '\n' '.' < version + cat version while read -rd $'\0' do if [[ "$REPLY" -gt "$max" ]] @@ -36,7 +36,7 @@ pkgver() { max="$REPLY" fi done < <(find */ -type f -exec stat --printf="%Y\0" '{}' +) - date -d "@$max" +%Y%m%d + date -d "@$max" +.%Y%m%d } package() { |