mirror of
https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git
synced 2025-12-29 03:23:00 +03:00
Hook for RedHat based systems (using dnf package manager). Untested.
This commit is contained in:
@@ -29,6 +29,7 @@ create_hook ()
|
|||||||
printf 'Choose your Linux distro:\n'
|
printf 'Choose your Linux distro:\n'
|
||||||
printf ' 1. Debian-based (Debian/Ubuntu/Mint/etc.)\n'
|
printf ' 1. Debian-based (Debian/Ubuntu/Mint/etc.)\n'
|
||||||
printf ' 2. Arch-based (Arch/Manjaro/etc.)\n'
|
printf ' 2. Arch-based (Arch/Manjaro/etc.)\n'
|
||||||
|
printf ' 3. RedHat-based (RedHat/Fedora/etc.)\n'
|
||||||
printf ' 0. Other\n'
|
printf ' 0. Other\n'
|
||||||
while read -p "Your choice: " DISTRIB; do
|
while read -p "Your choice: " DISTRIB; do
|
||||||
case $DISTRIB in
|
case $DISTRIB in
|
||||||
@@ -38,10 +39,15 @@ create_hook ()
|
|||||||
printf 'Now the script will run automatically every time apt installs or updates Opera.\n'
|
printf 'Now the script will run automatically every time apt installs or updates Opera.\n'
|
||||||
break;;
|
break;;
|
||||||
"2" )
|
"2" )
|
||||||
cp -f $SCRIPT_PATH/scripts/fix-opera.hook $INSTALL_PATH /usr/share/libalpm/hooks
|
cp -f $SCRIPT_PATH/scripts/fix-opera.hook $INSTALL_PATH
|
||||||
ln -sf $INSTALL_PATH/fix-opera.hook /usr/share/libalpm/hooks/
|
ln -sf $INSTALL_PATH/fix-opera.hook /usr/share/libalpm/hooks/
|
||||||
printf 'Now the script will run automatically every time pacman installs or updates Opera.\n'
|
printf 'Now the script will run automatically every time pacman installs or updates Opera.\n'
|
||||||
break;;
|
break;;
|
||||||
|
"3" )
|
||||||
|
cp -f $SCRIPT_PATH/scripts/fix-opera.action $INSTALL_PATH
|
||||||
|
ln -sf $INSTALL_PATH/fix-opera.action /etc/dnf/plugins/post-transaction-actions.d/
|
||||||
|
printf 'Now the script will run automatically every time dnf installs or updates Opera.\n'
|
||||||
|
break;;
|
||||||
"0" )
|
"0" )
|
||||||
printf "Autostart for your Linux distro is currently unsupported\n"
|
printf "Autostart for your Linux distro is currently unsupported\n"
|
||||||
break;;
|
break;;
|
||||||
|
|||||||
1
scripts/fix-opera.action
Normal file
1
scripts/fix-opera.action
Normal file
@@ -0,0 +1 @@
|
|||||||
|
opera-stable:in:/root/scripts/fix-opera.sh
|
||||||
Reference in New Issue
Block a user