You are not logged in.

#1 2021-07-24 11:21:31

Registered: 2020-06-23
Posts: 5

[SOLVED] Pacman hook for wine not working

Every time wine updates, some custom registry edits are removed and I need to execute a .reg file to add them again. I would like to automate this using a pacman hook.


#! /bin/bash


if [ ! -d "$Prefix" ]; then
    echo "foobar2000 prefix not found"
    exit 0

WINEPREFIX="$Prefix" regedit "$Prefix"/fix-launchers.reg
echo "foobar2000 prefix updated"
exit 0

Executing this script manually works as intended so the problem is in the .hook file?


Type = Package
Operation = Upgrade
Target = wine

Description = Updating wine prefix for foobar2000...
Exec = /usr/share/libalpm/scripts/wine-upgrade
When = PostTransaction

Edit: I just realized the regedit command should run as user instead of root.

Last edited by Mikko_H (2021-07-24 11:41:20)


Board footer

Powered by FluxBB