Skip to content

Commit

Permalink
Added eopkg support
Browse files Browse the repository at this point in the history
  • Loading branch information
wknapik committed Nov 20, 2024
1 parent da64b4c commit 038d5e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(distros): distro = $(subst _,:,$@)
$(distros) $(distros:%=%_clean): log = $(subst /,_,$(subst _,:,$(@:%_clean=%))).log

$(unsupported):
echo -n "Testing $(distro) (unsupported)... "
printf "Testing $(distro) (unsupported)... "
if ! docker run --rm -v "$$PWD/install.sh:/install.sh" "$(distro)" /install.sh >"$(log)" 2>&1 &&\
grep -q "Unsupported glibc version" "$(log)"; then
echo OK
Expand All @@ -26,7 +26,7 @@ $(unsupported):
opensuse/tumbleweed: setup = zypper --non-interactive install libglib-2_0-0

$(supported):
echo -n "Testing $(distro) (supported)... "
printf "Testing $(distro) (supported)... "
if docker run --rm -v "$$PWD/install.sh:/install.sh" "$(distro)" \
sh -c '$(or $(setup),true) && /install.sh && brave-browser --version || brave --version' >"$(log)" 2>&1; then
echo OK
Expand Down
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ main() {
show $sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
show $sudo dnf install -y brave-browser

elif available eopkg; then
show $sudo eopkg update-repo -y
show $sudo eopkg install -y brave

elif available yum; then
available yum-config-manager || show $sudo yum install yum-utils -y
show $sudo yum-config-manager -y --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
Expand Down Expand Up @@ -112,7 +116,7 @@ main() {
fi

else
error "Could not find a supported package manager. Only apt, dnf, paru/pikaur/yay, yum and zypper are supported." "" \
error "Could not find a supported package manager. Only apt, dnf, eopkg, paru/pikaur/yay, yum and zypper are supported." "" \
"If you'd like us to support your system better, please file an issue at" \
"https://github.com/brave/install.sh/issues and include the following information:" "" \
"$(uname -srvmo)" "" \
Expand All @@ -130,7 +134,7 @@ main() {
available() { command -v "${1:?}" >/dev/null; }
error() { exec >&2; printf "Error: "; printf "%s\n" "${@:?}"; exit 1; }
newer() { [ "$(printf "%s\n%s" "$1" "$2"|sort -V|head -n1)" = "${2:?}" ]; }
show() { (set -x; "$@"); }
show() { (set -x; "${@:?}"); }
supported() { newer "$2" "${3:?}" || error "Unsupported ${1:?} version ${2:-<empty>}. Only $1 versions >=$3 are supported."; }

main

0 comments on commit 038d5e2

Please sign in to comment.