| 1 |
implement a dpkg trigger to update mimemagic/tables.rb |
| 2 |
from /usr/share/mime/packages/freedesktop.org.xml |
| 3 |
using the provided script/generate-mime.rb. |
| 4 |
|
| 5 |
This would use: |
| 6 |
- a debian/triggers file with: |
| 7 |
interest /usr/share/mime/packages/freedesktop.org.xml |
| 8 |
- a debian/postint file with something like: |
| 9 |
!/bin/sh |
| 10 |
set -e |
| 11 |
|
| 12 |
MIMEMAGIC_SHARE=/usr/share/ruby-mimemagic |
| 13 |
MIMEMAGIC_LIB=/usr/lib/ruby/vendor_ruby/mimemagic |
| 14 |
MIMEDB=/usr/share/mime/packages/freedesktop.org.xml |
| 15 |
|
| 16 |
# generate automatically mimemagic/tables.rb from system MIME database |
| 17 |
# shipped by the shared-mime-info package |
| 18 |
|
| 19 |
if [ "$1" = "triggered" ]; then |
| 20 |
if [ -x $MIMEMAGIC_SHARE/generate-mime.rb ]; then |
| 21 |
$MIMEMAGIC_SHARE/generate-mime.rb $MIMEDB > $MIMEMAGIC_LIB/tables.rb |
| 22 |
fi |
| 23 |
exit 0 |
| 24 |
fi |
| 25 |
|
| 26 |
#DEBHELPER# |
| 27 |
|
| 28 |
- a way to update lib/mimemagic/tables.rb before running the tests. |
| 29 |
|
| 30 |
|
| 31 |
Unfortunately, for the moment, this script fails on the system |
| 32 |
freedesktop.org.xml file. |
| 33 |
|
| 34 |
-- Cédric Boutillier <[email protected]> Fri, 24 Apr 2015 14:48:50 +0200 |