From 051a8ad89c2d14cbe67a157bb8e657a8460cbd34 Mon Sep 17 00:00:00 2001 From: Brett Kuskie Date: Tue, 2 Jul 2024 04:51:19 -0600 Subject: [PATCH] Add Opera --- conf/menu.xml | 1 + scripts/install_opera.sh | 12 ++++++++++++ scripts/opera.sh | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 scripts/install_opera.sh create mode 100755 scripts/opera.sh diff --git a/conf/menu.xml b/conf/menu.xml index 874ef9b..825276a 100644 --- a/conf/menu.xml +++ b/conf/menu.xml @@ -43,6 +43,7 @@ /app/scripts/chromium.sh /app/scripts/vivaldi.sh /app/scripts/firefox.sh + /app/scripts/opera.sh /app/scripts/brave_release.sh /app/scripts/brave_beta.sh /app/scripts/brave_nightly.sh diff --git a/scripts/install_opera.sh b/scripts/install_opera.sh new file mode 100755 index 0000000..488c629 --- /dev/null +++ b/scripts/install_opera.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +export DEBIAN_FRONTEND="noninteractive" +OPERA_VERS=`curl 'https://download3.operacdn.com/pub/opera/desktop/' | grep "\-2024 " | awk -F\" '{print $2}' | cut -d/ -f1 | tail -n1` +URL="https://download3.operacdn.com/pub/opera/desktop/${OPERA_VERS}/linux/opera-stable_${OPERA_VERS}_amd64.deb" +DEB="/tmp/opera.deb" + +wget ${URL} -O ${DEB} +dpkg -i ${DEB} || (set -e; apt-get update; apt-get install -f -y; apt-get install -y upower) +rm ${DEB} diff --git a/scripts/opera.sh b/scripts/opera.sh new file mode 100755 index 0000000..b2b3851 --- /dev/null +++ b/scripts/opera.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +BINARY="opera" + +BINARYLOC=`which ${BINARY}` +if [ "$?" -ne "0" ]; then + set -e + + xterm -T InstallOpera -g 100x30 -e sudo /app/scripts/install_opera.sh +fi + +dbus-launch ${BINARY} --no-sandbox --disable-gpu