summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian 'Swift Geek' Grzywna2018-09-16 15:07:59 +0200
committerSebastian 'Swift Geek' Grzywna2018-09-16 15:13:36 +0200
commit43fda2c6ebf02f57ab8ccb14b0c24d8ebab9264c (patch)
tree1ba9783bda638706bf147b3fe3f47f6400d8c480
parent05f799f965605c267414c54d6337cdf168cb0e6a (diff)
downloadaur-43fda2c6ebf02f57ab8ccb14b0c24d8ebab9264c.tar.gz
Add automatic bump, if installed firefox-nightly is newer than pkgver
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 12 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 16dc4f1e3f8..c63c1e8c61d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sun Sep 16 12:04:54 UTC 2018
+# Sun Sep 16 13:13:13 UTC 2018
pkgbase = firefox-nightly-i18n
pkgdesc = Universal i18n for firefox-nightly - xpi version
pkgver = 64.0a1.20180916
diff --git a/PKGBUILD b/PKGBUILD
index fe172dbc908..45b62dcd836 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,6 +4,7 @@
pkgname=firefox-nightly-i18n
_version=64.0a1
+#_version="${pkgver%.*}"
pkgver=64.0a1.20180916
pkgrel=1
pkgdesc='Universal i18n for firefox-nightly - xpi version'
@@ -13,7 +14,13 @@ license=('MPL')
depends=('firefox-nightly')
pkgver() {
- echo "${_version}.$(date +%Y%m%d)"
+ _installed_ver="$(sed -n '/%VERSION%/{n;p;}' /var/lib/pacman/local/firefox-nightly-64.0a1.20180915-1/desc)"
+ if [ -n "$_installed_ver" ] && [ "${_installed_ver%%.*}" -gt "${_version%%.*}" ]; then
+ msg2 "Installed firefox-nightly is newer than $_version. Bumping to $_installed_ver"
+ echo "${_installed_ver%-*}"
+ else
+ echo "${_version}.$(date +%Y%m%d)"
+ fi
}
countdown() {
@@ -41,7 +48,8 @@ ls_lang () {
curl "http://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/linux-$CARCH/xpi/" | tr '"' '\n' | grep xpi$ | sed -e 's/\.langpack\.xpi//g' -e "s#/pub/firefox/nightly/latest-mozilla-central-l10n/linux-$CARCH/xpi/firefox-[0-9.]*a1\.##"
}
-prepare() {
+build() {
+ _version="${pkgver%.*}"
cd "${srcdir}"
msg "Getting LANG-packs list from ftp.mozilla.com…"
srv_lang_list=($(ls_lang))
@@ -100,6 +108,7 @@ prepare() {
}
package () {
+ _version="${pkgver%.*}"
cd ${srcdir}
install -d ${pkgdir}/opt/firefox-${_version}/browser/extensions/
install -d ${pkgdir}/opt/firefox-${_version}/defaults/pref