summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-02-26 08:56:44 +0000
committerXiao Pan <gky44px1999@gmail.com>2024-02-26 08:56:44 +0000
commit2e7c3ac45bff0ea85843faef6dbc2038509b5e7b (patch)
tree106d7cdcc00aefaa3830a7e184b036ab54fd3959 /etc
parent05c13b57cb36039ce01ba8524986b326a70b39e3 (diff)
feat: pacman hook upgrade highlight.css for cgit syntax highlighting
Diffstat (limited to 'etc')
-rw-r--r--etc/pacman.d/hooks/highlight-css.hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/pacman.d/hooks/highlight-css.hook b/etc/pacman.d/hooks/highlight-css.hook
new file mode 100644
index 00000000..e3411b7b
--- /dev/null
+++ b/etc/pacman.d/hooks/highlight-css.hook
@@ -0,0 +1,14 @@
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = highlight
+
+[Action]
+Description = Upgrade highlight.css for cgit syntax highlighting...
+When = PostTransaction
+# mycgit.css import this highlight.css and cgit.css, for syntax-highlighting-edited.sh
+# because cgit.css is not pacman backup file and will be overwritten when upgrade cgit
+Exec = /usr/bin/highlight -O xhtml --print-style -o /usr/share/webapps/cgit/highlight.css
+Depends = highlight
+Depends = cgit