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/' f' && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/limine/'
) )
hook_contents = f'''[Trigger] hook_contents = textwrap.dedent(
Operation = Install f'''\
Operation = Upgrade [Trigger]
Type = Package Operation = Install
Target = limine Operation = Upgrade
Type = Package
Target = limine
[Action] [Action]
Description = Deploying Limine after upgrade... Description = Deploying Limine after upgrade...
When = PostTransaction When = PostTransaction
Exec = /bin/sh -c "{hook_command}" Exec = /bin/sh -c "{hook_command}"
''' '''
)
hooks_dir = self.target / 'etc' / 'pacman.d' / 'hooks' hooks_dir = self.target / 'etc' / 'pacman.d' / 'hooks'
hooks_dir.mkdir(parents=True, exist_ok=True) hooks_dir.mkdir(parents=True, exist_ok=True)