mirror of
https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git
synced 2026-03-30 04:53:50 +03:00
Reworked install / uninstall
Hardened scripts a little, made them more distro agnostic
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
DPkg::Pre-Invoke {"stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp 2> /dev/null || echo 0 > /tmp/opera.timestamp";};
|
||||
DPkg::Post-Invoke {"set NEW_OPERA=`stat -c %Z $(readlink -f $(which opera))` || exit 0; set OLD_OPERA=`cat /tmp/opera.timestamp` || exit 0; if [ "$NEW_OPERA" != "$OLD_OPERA" ]; then /root/.scripts/fix-opera.sh; fi; rm -f /tmp/opera.timestamp";};
|
||||
DPkg::Post-Invoke {"set NEW_OPERA=`stat -c %Z $(readlink -f $(which opera))` || exit 0; set OLD_OPERA=`cat /tmp/opera.timestamp` || exit 0; if [ "$NEW_OPERA" != "$OLD_OPERA" ]; then /root/.scripts/fix-opera.sh; fi; rm -f /tmp/opera.timestamp";};
|
||||
@@ -1 +1 @@
|
||||
opera-stable:in:/root/.scripts/fix-opera.sh
|
||||
opera-stable:in:/root/.scripts/fix-opera.sh
|
||||
@@ -13,4 +13,4 @@ Depends = bash
|
||||
Depends = curl
|
||||
Depends = unzip
|
||||
Depends = jq
|
||||
Exec = /root/.scripts/fix-opera.sh
|
||||
Exec = /root/.scripts/fix-opera.sh
|
||||
10
scripts/fix-opera.sh
Executable file → Normal file
10
scripts/fix-opera.sh
Executable file → Normal file
@@ -10,22 +10,22 @@ if [[ $(uname -m) != "x86_64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! which unzip > /dev/null; then
|
||||
if command -v unzip > /dev/null; then
|
||||
printf '\033[1munzip\033[0m package must be installed to run this script\n'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! which curl > /dev/null; then
|
||||
if command -v curl > /dev/null; then
|
||||
printf '\033[1mcurl\033[0m package must be installed to run this script\n'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! which jq > /dev/null; then
|
||||
if command -v jq > /dev/null; then
|
||||
printf '\033[1mjq\033[0m package must be installed to run this script\n'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if which pacman &> /dev/null; then
|
||||
if command -v pacman &> /dev/null; then
|
||||
ARCH_SYSTEM=true
|
||||
fi
|
||||
|
||||
@@ -136,4 +136,4 @@ done
|
||||
|
||||
#Removing temporary files
|
||||
printf 'Removing temporary files...\n'
|
||||
rm -rf "$FIX_DIR"
|
||||
rm -rf "$FIX_DIR"
|
||||
Reference in New Issue
Block a user