Skip to content

Commit

Permalink
Merge mkfontdir/mkfontscale hooks to single pair of hooks.
Browse files Browse the repository at this point in the history
Instead of using a new hook for each font dir, teach one hook to loop
through each font dir.
  • Loading branch information
eli-schwartz committed Mar 17, 2016
1 parent 71e6805 commit 1f5b1b3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 44 deletions.
11 changes: 0 additions & 11 deletions hooks/mkfontdir-otf.hook

This file was deleted.

11 changes: 0 additions & 11 deletions hooks/mkfontdir-ttf.hook

This file was deleted.

13 changes: 13 additions & 0 deletions hooks/mkfontdir.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/fonts/*/
Target = !usr/share/fonts/*/*/

[Action]
Description = Indexing fonts...
When = PostTransaction
Exec = /bin/bash -c 'while read line; do mkfontdir $line; done'
NeedsTargets
11 changes: 0 additions & 11 deletions hooks/mkfontscale-otf.hook

This file was deleted.

11 changes: 0 additions & 11 deletions hooks/mkfontscale-ttf.hook

This file was deleted.

13 changes: 13 additions & 0 deletions hooks/mkfontscale.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/fonts/*/
Target = !usr/share/fonts/*/*/

[Action]
Description = Indexing scalable fonts...
When = PostTransaction
Exec = /bin/bash -c 'while read line; do mkfontscale $line; done'
NeedsTargets

0 comments on commit 1f5b1b3

Please sign in to comment.