summarylogtreecommitdiffstats
path: root/firefox-developer-edition-firefox-symlink.hook
diff options
context:
space:
mode:
authorClaudia Pellegrino2021-10-24 21:23:14 +0200
committerClaudia Pellegrino2021-12-20 15:02:05 +0100
commit219f20a08c36a0d3d41918769c98b616ec7cee3e (patch)
treea17bedaf56921d94292843913f80319d27ca09ac /firefox-developer-edition-firefox-symlink.hook
parentf6f65127f6989a4abb121bc89ccb03b63b3f9d1f (diff)
downloadaur-219f20a08c36a0d3d41918769c98b616ec7cee3e.tar.gz
Symlink everything we can find in /usr/lib/firefox
The Arch Linux repositories have many packages which add features or extensions to Firefox. The AUR has even more. However, all those packages keep their files inside the `/usr/lib/firefox` hierarchy so they never worked for `firefox-developer-edition` users. This commit enables many such extension and feature packages, for example: - firefox-noscript - firefox-ublock-origin - firefox-extension-multi-account-containers (AUR) to work with `firefox-developer-edition`. How it works: This commit adds install scripts and an ALPM hook. Together, those scripts and the hook will keep `/usr/lib/firefox` and `/usr/lib/firefox-developer-edition` in sync. They achieve that by creating symlinks pointing to each file in the `/usr/lib/firefox` hierarchy. Pacman will run that hook whenever adding or removing something in that hierarchy. Pacman will also run the install script whenever this package gets installed, updated, or removed. The scripts and the hook will handle the following events: - When pacman installs anything into the `/usr/lib/firefox` hierarchy while this package is installed, the ALPM hook deletes and recreates the symlinks. - The same thing happens when pacman modifies or removes anything in the `/usr/lib/firefox` hierarchy while this package is installed. - When pacman removes the `/usr/lib/firefox` hierarchy while this package is installed, the ALPM hook deletes all the symlinks. - When pacman first installs this package, the install script creates the symlinks. - When pacman updates this package, the install script deletes and recreates the symlinks. - When pacman removes this package, the install script deletes all the symlinks.
Diffstat (limited to 'firefox-developer-edition-firefox-symlink.hook')
-rw-r--r--firefox-developer-edition-firefox-symlink.hook12
1 files changed, 12 insertions, 0 deletions
diff --git a/firefox-developer-edition-firefox-symlink.hook b/firefox-developer-edition-firefox-symlink.hook
new file mode 100644
index 000000000000..7e7b6269e5ac
--- /dev/null
+++ b/firefox-developer-edition-firefox-symlink.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/firefox/*
+
+[Action]
+Description = Updating symlinks for firefox-developer-edition...
+Exec = /bin/bash -c "cd /usr/share/libalpm/scripts && ./firefox-developer-edition-firefox-symlinks-delete && ./firefox-developer-edition-firefox-symlinks-create"
+When = PostTransaction
+Depends = firefox-developer-edition