summarylogtreecommitdiffstats
path: root/mercury-browser.install
blob: 10e65bad61e039794e4e4fb8c5365398bbae3a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Colored makepkg-like functions
msg_blue() {
  printf "${BLUE}==>${BOLD} $1${ALL_OFF}\n"
}

note1() {
  printf "${BLUE}==>${YELLOW} NOTE:${BOLD} $1${ALL_OFF}\n"
}

note2() {
  printf "${BLUE}==>      ${BOLD} $1${ALL_OFF}\n"
}

ALL_OFF="$(tput sgr0)"
BOLD="${ALL_OFF}$(tput bold)"
BLACK="${BOLD}$(tput setaf 0)"
RED="${BOLD}$(tput setaf 1)"
GREEN="${BOLD}$(tput setaf 2)"
YELLOW="${BOLD}$(tput setaf 3)"
BLUE="${BOLD}$(tput setaf 4)"
MAGENTA="${BOLD}$(tput setaf 5)"
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
    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."
    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."
    note2 "mercury-browser may not work on your computer."
  fi
}

post_upgrade() {
  post_install
}