diff options
author | BloodyAltair | 2019-03-27 21:31:29 +0300 |
---|---|---|
committer | BloodyAltair | 2019-03-27 21:31:29 +0300 |
commit | 2738ef85f737d660eb76dbbbd6d2a09eec66985c (patch) | |
tree | a6f04105c118ba1693950214eea5ad9cb44fa2f0 | |
parent | 5d1d80f0a78bfb1b7442d1817d12b915a8027c0b (diff) | |
download | aur-2738ef85f737d660eb76dbbbd6d2a09eec66985c.tar.gz |
+ Update scripts
+ Version update fix
+ Version update
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | pkg_upgrader.sh | 16 | ||||
-rwxr-xr-x | repo_upgrader.sh | 10 | ||||
-rwxr-xr-x | update.sh | 8 |
5 files changed, 40 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgbase = firefox-nightly-ru pkgdesc = Standalone Web Browser from Mozilla — Nightly build (ru) - pkgver = 67.0a1.20190201093730 + pkgver = 68.0a1 pkgrel = 1 url = http://nightly.mozilla.org/ install = firefox-nightly-ru.install @@ -31,12 +31,12 @@ pkgbase = firefox-nightly-ru sha512sums = 02bd8c8c717e6796fb1772f51c1bfd78ff3ca7c5355c08b9568dc36cb72b8b84330d20522653eedda12bdec1517cd4074a4bc5d51a8667880121e946b85c11ec sha512sums = baff53b8c7e4f5a43314ab0d69498989f99e18c877d6429e083c0d460f14f6920ce0ba7405e76f827ac697a38c2d2a18a192a25b16f7d078bacbb8ad19b2e8e4 sha512sums = 5ed67bde39175d4d10d50ba5b12063961e725e94948eadb354c0588b30d3f97d2178b66c1af466a6e7bd208ab694227a1391c4141f88d3da1a1178454eba5308 - source_i686 = 20190321-firefox-68.0a1.ru.linux.tar.bz2::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-i686.tar.bz2 - source_i686 = 20190321-firefox-68.0a1.ru.linux.tar.bz2.asc::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-i686.tar.bz2.asc + source_i686 = 20190327-firefox-68.0a1.ru.linux.tar.bz2::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-i686.tar.bz2 + source_i686 = 20190327-firefox-68.0a1.ru.linux.tar.bz2.asc::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-i686.tar.bz2.asc sha512sums_i686 = SKIP sha512sums_i686 = SKIP - source_x86_64 = 20190321-firefox-68.0a1.ru.linux.tar.bz2::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-x86_64.tar.bz2 - source_x86_64 = 20190321-firefox-68.0a1.ru.linux.tar.bz2.asc::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-x86_64.tar.bz2.asc + source_x86_64 = 20190327-firefox-68.0a1.ru.linux.tar.bz2::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-x86_64.tar.bz2 + source_x86_64 = 20190327-firefox-68.0a1.ru.linux.tar.bz2.asc::https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-68.0a1.ru.linux-x86_64.tar.bz2.asc sha512sums_x86_64 = SKIP sha512sums_x86_64 = SKIP @@ -7,7 +7,7 @@ _baseurl="https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest- _date="$(date +%Y%m%d)" _filename="firefox-${_version}.ru.linux" pkgname=firefox-nightly-ru -pkgver=67.0a1.20190201093730 +pkgver=68.0a1 pkgrel=1 pkgdesc='Standalone Web Browser from Mozilla — Nightly build (ru)' arch=('i686' 'x86_64') diff --git a/pkg_upgrader.sh b/pkg_upgrader.sh new file mode 100755 index 000000000000..a2005f06e659 --- /dev/null +++ b/pkg_upgrader.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# ######################################################### +# You can use this script as +# cronjob (or something lika that) +# to automatically update the app. +# +# DON'T FORGET TO REPLACE `yay` to your favorite AUR helper +# ######################################################### + +RELEASE_TIMESTAMP=$(curl -sL https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/ | grep -A2 "firefox-$(cat PKGBUILD | grep -oP "^_version=\K(.*)" | awk '{print $1}').ru.linux-x86_64.tar.bz2\"" | tail -n1 | cut -f2 -d'>' | cut -f1 -d'<' | date +"%s" -f -) +LOCAL_TIMESTAMP=$(cat ~/.firefox-nightly-ru.release.timestamp || echo 0) + +if (("$RELEASE_TIMESTAMP" > "$LOCAL_TIMESTAMP")); then + yay -S firefox-nightly-ru --noconfirm && echo $RELEASE_TIMESTAMP > ~/.firefox-nightly-ru.release.timestamp +fi diff --git a/repo_upgrader.sh b/repo_upgrader.sh new file mode 100755 index 000000000000..0a315ae8fb2c --- /dev/null +++ b/repo_upgrader.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# ################################################### +# You can use this script as +# cronjob (or something lika that) +# to automatically update package repository +# +# This script can be useful ONLY for repo contributors +# #################################################### +cd $(dirname "$0") +./update.sh && git pull && makepkg --printsrcinfo > .SRCINFO && git add PKGBUILD .SRCINFO && ./update.sh | grep -oP "^\w+: [0-9a-z.]+, \w+: \K([0-9a-z.]+)$" | awk '{print "Update to " $1}' | git commit -F - && git push diff --git a/update.sh b/update.sh index 00896230d655..3f224f90240f 100755 --- a/update.sh +++ b/update.sh @@ -1,9 +1,17 @@ #!/bin/bash + +# ########################## +# You can use this script +# to update PKGBUILD version +# ########################## + + _remote=$(curl -sL https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.FIREFOX_NIGHTLY') _current=$(grep _version= PKGBUILD | cut -f2 -d'=') echo "PKGBUILD: ${_current}, REMOTE: ${_remote}" if [ "${_remote}" != "${_current}" ]; then sed -i "s/_version=.*/_version=${_remote}/" PKGBUILD + sed -i "s/pkgver=.*/pkgver=${_remote}/" PKGBUILD echo "Updated" exit 0 fi |