Dedent Limine hook (#3286)

This commit is contained in:
codefiles 2025-03-21 18:35:14 -04:00 committed by GitHub
parent edf8bf9b0a
commit 6615d18246
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 10 deletions

View File

@ -1329,17 +1329,20 @@ class Installer:
f' && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/limine/'
)
hook_contents = f'''[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = limine
hook_contents = textwrap.dedent(
f'''\
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = limine
[Action]
Description = Deploying Limine after upgrade...
When = PostTransaction
Exec = /bin/sh -c "{hook_command}"
'''
[Action]
Description = Deploying Limine after upgrade...
When = PostTransaction
Exec = /bin/sh -c "{hook_command}"
'''
)
hooks_dir = self.target / 'etc' / 'pacman.d' / 'hooks'
hooks_dir.mkdir(parents=True, exist_ok=True)