Changeset 7375


Ignore:
Timestamp:
Jun 6, 2018, 12:38:23 PM (17 months ago)
Author:
Juanma
Message:

add diversion

Location:
air-manager/trunk/fuentes/debian
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • air-manager/trunk/fuentes/debian/air-installer.postinst

    r7374 r7375  
    11#!/bin/bash
     2setg -e
    23
    34APP="air-installer"
    45EXT="air"
     6# Template for diversions
     7ORIG_FILE="/usr/share/mime/application/vnd.adobeair-application-installer-package+zip.xml"
     8OUR_FILE="/usr/share/mime/package/x-air-installer.xml"
     9OUR_PACKAGE="air-installer"
    510
    6 # Create mime xml
    7 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    8 <mime-info xmlns=\"http://www.freedesktop.org/standards/shared-mime-info\">
    9     <mime-type type=\"application/x-$APP\">
    10         <comment>Install air app</comment>
    11         <icon name=\"air-installer\"/>
    12         <glob pattern=\"*.$EXT\"/>
    13     </mime-type>
    14 </mime-info>" > /usr/share/mime/packages/x-$APP.xml
    15 
     11case $1 in
     12        configure)
     13                # Create mime xml
     14                echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
     15                <mime-info xmlns=\"http://www.freedesktop.org/standards/shared-mime-info\">
     16                    <mime-type type=\"application/x-$APP\">
     17                        <comment>Install air app</comment>
     18                        <icon name=\"air-installer\"/>
     19                        <glob pattern=\"*.$EXT\"/>
     20                    </mime-type>
     21                </mime-info>" > /usr/share/mime/packages/x-$APP.xml
     22                 if dpkg-divert --package ${OUR_PACKAGE} --add  --rename  --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then
     23                        ln -fs ${OUR_FILE} ${ORIG_FILE}
     24                else
     25                        echo "Unabe to divert file ${ORIG_FILE}"
     26                fi
     27               
     28        ;;
    1629#update databases for both application and mime
    1730#update-desktop-database /usr/share/applications
    1831update-mime-database    /usr/share/mime
    1932
     33#DEBHELPER#
  • air-manager/trunk/fuentes/debian/changelog

    r7374 r7375  
     1air-manager (0.1.2.2) xenial; urgency=medium
     2
     3  * Add diversion for adobeair mime file
     4
     5 -- Juanma Navarro Mañez <juanma1980@gmail.com>  Wed, 06 Jun 2018 12:36:38 +0200
     6
    17air-manager (0.1.2.1) xenial; urgency=medium
    28
Note: See TracChangeset for help on using the changeset viewer.