diff options
author | xiota | 2024-01-11 18:05:01 -0800 |
---|---|---|
committer | xiota | 2024-01-11 18:05:01 -0800 |
commit | 5db68f0226dbbbc68f7fa0cf1e4bcc2212ed3823 (patch) | |
tree | 90a669f13791a7a6f322e262153866fa77de4e78 | |
parent | fef8126d6065758f41d5a23278cb8b66f881834d (diff) | |
download | aur-5db68f0226dbbbc68f7fa0cf1e4bcc2212ed3823.tar.gz |
update scripts; blacklist windows-only release
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | mercury-browser.install | 6 | ||||
-rw-r--r-- | mercury-browser.sh | 6 |
4 files changed, 21 insertions, 12 deletions
@@ -16,7 +16,7 @@ pkgbase = mercury-browser-bin source = mercury-browser_121.0.1_amd64.deb::https://github.com/Alex313031/Mercury/releases/download/v.121.0.1/mercury-browser_121.0.1_amd64.deb source = mercury-browser.sh sha256sums = SKIP - sha256sums = c542235c03f0ca3cfed6cebb234d7637cd920dcfbba47d2a31c0814f525788ae + sha256sums = f9e17206a6fc510623d34467ece76787741faabe3bdf02a7facd17147e1dd660 pkgname = mercury-browser-bin depends = alsa-lib @@ -44,7 +44,7 @@ _main_package() { ) sha256sums=( 'SKIP' - 'c542235c03f0ca3cfed6cebb234d7637cd920dcfbba47d2a31c0814f525788ae' + 'f9e17206a6fc510623d34467ece76787741faabe3bdf02a7facd17147e1dd660' ) } @@ -187,14 +187,23 @@ _update_version() { return fi - local _response=$(curl -Ssf "$url/releases.atom") - local _tag=$( + local _blacklist _response _tags _tag _pkgver_new + + _blacklist=( + "v.121.0.2" # windows only + ) + _response=$(curl -Ssf "$url/releases.atom") + _tags=$( printf '%s' "$_response" \ | grep '/releases/tag/' \ | sed -E 's@^.*/releases/tag/(.*)".*$@\1@' \ - | grep -Ev '[a-z]{2}' | sort -V | tail -1 + | grep -Ev '[a-z]{2}' ) - local _pkgver_new="${_tag#v.}" + for i in "${_blacklist[@]}" ; do + _tags=${_tags/$i} + done + _tag=$(printf '%s' "$_tags" | sort -rV | head -1) + _pkgver_new="${_tag#v.}" # update _pkgver if [ "$_pkgver" != "${_pkgver_new:?}" ] ; then diff --git a/mercury-browser.install b/mercury-browser.install index 10e65bad61e0..819d61c1facf 100644 --- a/mercury-browser.install +++ b/mercury-browser.install @@ -26,11 +26,11 @@ post_install() { if /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v3.*supported.*$' ; then note1 "Custom flags may be put directly in: ~/.config/mercury-flags.conf" note2 "The launcher is called: 'mercury-browser'" - elif /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v2.*supported.*$' ; then - note1 "Your processor supports x86-64-v2, but not x86-64-v3." + elif grep -qE '\bpni\b' /proc/cpuinfo ; then + note1 "Your processor does not supports x86-64-v3." note2 "You may want to install mercury-browser-sse3-bin instead." else - note1 "Your processor does not support x86-64-v2 or x86-64-v3." + note1 "Your processor does not support SSE3 instructions." note2 "mercury-browser may not work on your computer." fi } diff --git a/mercury-browser.sh b/mercury-browser.sh index 1b8c1f36ef97..ea7e7f01220c 100644 --- a/mercury-browser.sh +++ b/mercury-browser.sh @@ -4,13 +4,13 @@ if /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v3.*supported.*$' ; then _message='' _message+=$'The fastest Firefox fork on Earth.' -elif /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v2.*supported.*$' ; then +elif grep -qE '\bpni\b' /proc/cpuinfo ; then _message='' - _message+=$'Your processor supports x86-64-v2, but not x86-64-v3.\n' + _message+=$'Your processor does not support x86-64-v3.\n' _message+=$'You may want to use mercury-browser-sse3-bin.' else _message='' - _message+=$'Your processor does not support x86-64-v2 or x86-64-v3.\n' + _message+=$'Your processor does not support SSE3 instructions.\n' _message+=$'mercury-browser may not work on your computer.' fi |