#!/bin/bash TMP=$(mktemp -d) cd $TMP unzip /home/e-smith/files/shares/wpkg/files/softwares/thunderbird_addons/sogo-integrator*sogo-demo.xpi 2>&1 > /dev/null HOSTNAME=$(db configuration get SystemName) DOMAINNAME=$(db configuration get DomainName) sed -i -e "s|http://sogo-demo.inverse.ca/|https://$HOSTNAME.$DOMAINNAME/|g" ./chrome/content/extensions.rdf rm -f $TMP/defaults/preferences/*.js rm -rf $TMP/custom/sogo-demo rm -f /home/e-smith/files/shares/wpkg/files/softwares/thunderbird_addons/sogo-integrator.xpi zip -r /home/e-smith/files/shares/wpkg/files/softwares/thunderbird_addons/sogo-integrator.xpi ./ 2>&1 > /dev/null rm -rf $TMP/