source: lliurex-firefox-settings/trunk/fuentes/debian/lliurex-firefox-settings.postinst @ 3724

Last change on this file since 3724 was 3724, checked in by Juanma, 3 years ago

WIP on homepage

File size: 1.1 KB
Line 
1#!/bin/sh
2set -e
3
4ORIG_FILE="/etc/xul-ext/ubufox.js"
5OUR_FILE="/etc/xul-ext/lliurex.js"
6DIST_ORIG_FILE="/usr/lib/firefox/distribution/distribution.ini"
7DIST_OUR_FILE="/usr/lib/firefox/distribution/lliurex.ini"
8SERVER_HP="/usr/share/lliurex-firefox-settings/lliurex-firefox.properties"
9STANDALONE_HP="/usr/share/lliurex-firefox-settings/lliurex-firefox_standalone.properties"
10WORKFILE="/etc/firefox/lliurex-firefox.properties"
11
12case $1 in
13
14        configure)
15                if dpkg-divert --package lliurex-firefox-settings--add  --rename  --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then
16                        ln -fs ${OUR_FILE} ${ORIG_FILE}
17                else
18                        echo "Unabe to divert file ${ORIG_FILE}"
19                fi
20                if dpkg-divert --package lliurex-firefox-settings--add  --rename  --divert ${DIST_ORIG_FILE}.real ${DIST_ORIG_FILE} ; then
21                        ln -fs ${DIST_OUR_FILE} ${DIST_ORIG_FILE}
22                else
23                        echo "Unabe to divert file ${ORIG_FILE}"
24                fi
25                ;;
26                if      [[ `lliurex-version -f | /bin/egrep "(server|client)"` ]] 
27                then
28                                ln -fs $WORKFILE $SERVER_HP
29                else
30                                ln -fs $WORKFILE $STANDALONE_HP
31                fi
32        *)
33                echo "Nothing to do"
34                ;;
35esac
36
37#DEBHELPER#
Note: See TracBrowser for help on using the repository browser.