From 209825c5fd3cf657e99352edfa76167a9a983ef9 Mon Sep 17 00:00:00 2001 From: Ld-Hagen <34414986+Ld-Hagen@users.noreply.github.com> Date: Sat, 25 Sep 2021 18:19:17 +0300 Subject: [PATCH] Autodetected Opera path instead of hardcoded. Architecture check --- fix-opera.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fix-opera.sh b/fix-opera.sh index 717b8cd..a759200 100755 --- a/fix-opera.sh +++ b/fix-opera.sh @@ -6,8 +6,13 @@ if [[ $(whoami) != "root" ]]; then exit 1 fi +if [ $(uname -m) != "x86_64" ]; then + printf 'This script is intended for 64-bit systems\n' + exit 1 +fi + readonly TEMP_FOLDER='/tmp' -readonly OPERA_FOLDER='/usr/lib/x86_64-linux-gnu/opera' +readonly OPERA_FOLDER=`dirname "$(readlink -f $(which opera))"` readonly FILE_NAME='libffmpeg.so' readonly ZIP_FILE='.zip' readonly TEMP_FILE="$TEMP_FOLDER/$FILE_NAME"