Add to mimetypes.list, fix mime type names

This commit is contained in:
zzz
2020-05-13 08:10:31 -04:00
parent 60aa1baacc
commit dd60da4337
2 changed files with 11 additions and 7 deletions

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-i2p-su3">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P router update file</comment>
<comment>I2P update</comment>
<glob pattern="*.su3"/>
<magic priority="60">
<match value="I2Psu3" type="string" offset="0"/>
@ -11,35 +10,35 @@
<!-- content-type is at offset 27; skip 21 bytes -->
<mime-type type="application/x-i2p-su3-update">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P router update file</comment>
<comment>I2P router update</comment>
<magic priority="75">
<match value="I2Psu3.....................\x01;" type="string" offset="0" mask="0xffffffffffff000000000000000000000000000000000000000000ff"/>
</magic>
</mime-type>
<mime-type type="application/x-i2p-su3-plugin">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P plugin install file</comment>
<comment>I2P plugin</comment>
<magic priority="75">
<match value="I2Psu3.....................\x02;" type="string" offset="0" mask="0xffffffffffff000000000000000000000000000000000000000000ff"/>
</magic>
</mime-type>
<mime-type type="application/x-i2p-su3-reseed">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P reseed file</comment>
<comment>I2P reseed</comment>
<magic priority="75">
<match value="I2Psu3.....................\x03;" type="string" offset="0" mask="0xffffffffffff000000000000000000000000000000000000000000ff"/>
</magic>
</mime-type>
<mime-type type="application/x-i2p-su3-news">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P news feed</comment>
<comment>I2P news</comment>
<magic priority="75">
<match value="I2Psu3.....................\x04;" type="string" offset="0" mask="0xffffffffffff000000000000000000000000000000000000000000ff"/>
</magic>
</mime-type>
<mime-type type="application/x-i2p-su3-blocklist">
<sub-class-of type="application/x-i2p-su3"/>
<comment>I2P blocklist feed</comment>
<comment>I2P blocklist</comment>
<magic priority="75">
<match value="I2Psu3.....................\x05;" type="string" offset="0" mask="0xffffffffffff000000000000000000000000000000000000000000ff"/>
</magic>

View File

@ -5,6 +5,11 @@
# these are for the .su3 file association
cp i2psu3.desktop "$HOME/.local/share/applications/"
grep -q i2psu3 "$HOME/.local/share/applications/mimeapps.list"
if [ "$?" -ne "0" ]
then
echo 'application/x-i2p-su3=i2psu3.desktop;' >> "$HOME/.local/share/applications/mimeapps.list"
fi
cp i2psu3.png "$HOME/.local/share/icons/hicolor/48x48/apps/"
cp i2psu3.xml "$HOME/.local/share/mime/packages/"