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

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

WIP on homepage

File size: 1.0 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                [[ `lliurex-version -f | egrep "(server|client)"` ]] && cp $SERVER_HP $WORKFILE || cp $STANDALONE_HP $WORKFILE
27        *)
28                echo "Nothing to do"
29                ;; 
30esac
31
32#DEBHELPER#
Note: See TracBrowser for help on using the repository browser.