diff options
author | xiota | 2023-11-17 12:49:38 -0800 |
---|---|---|
committer | xiota | 2023-11-17 13:00:49 -0800 |
commit | 52764656c020791cdca33df894f5c35bae68bd90 (patch) | |
tree | 8a76d6b6de91f45261cbd8a6b9ea9220e357211c | |
parent | 9923fc43e4bbbf4e1e026f8d265311a264fdf777 (diff) | |
download | aur-52764656c020791cdca33df894f5c35bae68bd90.tar.gz |
continue after failed processor check
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | mercury-browser.install | 19 | ||||
-rw-r--r-- | mercury-browser.sh | 28 |
4 files changed, 27 insertions, 28 deletions
@@ -1,7 +1,7 @@ pkgbase = mercury-browser-bin pkgdesc = Compiler optimized, private Firefox fork pkgver = 115.4.0 - pkgrel = 4 + pkgrel = 5 url = https://github.com/Alex313031/Mercury install = mercury-browser.install arch = x86_64 @@ -20,7 +20,7 @@ pkgbase = mercury-browser-bin source = mercury-browser_115.4.0_amd64.deb::https://github.com/Alex313031/Mercury/releases/download/v.115.4.0/mercury-browser_115.4.0_amd64.deb source = mercury-browser.sh sha256sums = SKIP - sha256sums = f76a772f2c377c319c4e8bd737d219891b0c439bd8e07efd96584021c2e74bbb + sha256sums = 7565aa160be433bcc030c2fc14627ce12c91fbb953d8ba8af8185ccd356022f5 pkgname = mercury-browser-bin depends = dbus-glib @@ -18,7 +18,7 @@ fi _pkgname="mercury-browser" pkgname="$_pkgname${_pkgtype:+-$_pkgtype}" pkgver=115.4.0 -pkgrel=4 +pkgrel=5 pkgdesc="Compiler optimized, private Firefox fork" url="https://github.com/Alex313031/Mercury" license=('MPL' 'GPL' 'LGPL') @@ -50,7 +50,7 @@ _main_package() { ) sha256sums=( 'SKIP' - 'f76a772f2c377c319c4e8bd737d219891b0c439bd8e07efd96584021c2e74bbb' + '7565aa160be433bcc030c2fc14627ce12c91fbb953d8ba8af8185ccd356022f5' ) } diff --git a/mercury-browser.install b/mercury-browser.install index 5e53179ff2d3..1b41a68c0550 100644 --- a/mercury-browser.install +++ b/mercury-browser.install @@ -1,10 +1,10 @@ # Colored makepkg-like functions msg_blue() { - printf "${BLUE}==>${BOLD} $1${ALL_OFF}\n" + printf "${BLUE}==>${BOLD} $1${ALL_OFF}\n" } note() { - printf "${BLUE}==>${YELLOW} NOTE:${BOLD} $1${ALL_OFF}\n" + printf "${BLUE}==>${YELLOW} NOTE:${BOLD} $1${ALL_OFF}\n" } ALL_OFF="$(tput sgr0)" @@ -19,15 +19,14 @@ CYAN="${BOLD}$(tput setaf 6)" WHITE="${BOLD}$(tput setaf 7)" post_install() { - if /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v3.*supported.*$' ; then - note "Congratulations. Your processor supports x86-64-v3." - note "Enjoy the fastest Firefox fork on Earth: mercury-browser" - else - note "Your processor does not support x86-64-v3." - note "mercury-browser will not work on your computer." - fi + if /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v3.*supported.*$' ; then + note "Enjoy the fastest Firefox fork on Earth: mercury-browser" + else + note "Your processor does not support x86-64-v3." + note "mercury-browser may not work on your computer." + fi } post_upgrade() { - post_install + post_install } diff --git a/mercury-browser.sh b/mercury-browser.sh index 0e89be023298..eac094bad6c7 100644 --- a/mercury-browser.sh +++ b/mercury-browser.sh @@ -2,26 +2,26 @@ # check microprocessor architecture level if /usr/lib/ld-linux-x86-64.so.2 --help | grep -qsE '^\s+x86-64-v3.*supported.*$' ; then - XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config} + _message+=$'Enjoy the fastest Firefox fork on Earth.' +else + _message='' + _message+=$'Your processor does not support x86-64-v3.\n' + _message+=$'mercury-browser may not work on your computer.' +fi - # Allow users to override command-line options - if [[ -f $XDG_CONFIG_HOME/mercury-flags.conf ]]; then - MERCURY_USER_FLAGS="$(cat $XDG_CONFIG_HOME/mercury-flags.conf)" - fi +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config} - # Launch - exec /opt/mercury-browser/mercury $MERCURY_USER_FLAGS "$@" -else - _message='' - _message+=$'Your processor does not support x86-64-v3.\n' - _message+=$'mercury-browser will not work on your computer.' +# Allow users to override command-line options +if [[ -f $XDG_CONFIG_HOME/mercury-flags.conf ]]; then + MERCURY_USER_FLAGS="$(cat $XDG_CONFIG_HOME/mercury-flags.conf)" fi # display processor support message if tty -s ; then - echo "${_message:?}" + echo "$_message" else - notify-send -a "mercury-browser" -t 3000 "${_message:?}" + [ ! -e "$HOME/.mercury" ] && notify-send -a "mercury-browser" -t 7500 "$_message" fi -exit 1 +# Launch +exec /opt/mercury-browser/mercury $MERCURY_USER_FLAGS "$@" |