diff options
author | marcus <marcus@FreeBSD.org> | 2005-02-26 17:32:01 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-02-26 17:32:01 +0800 |
commit | cd91a258a3250f3b82433bd7686870a7e552ebdb (patch) | |
tree | fadb3b19045f5b23cf9c6262b4e96abc4a5b4689 /www/firefox/files | |
parent | 7ba030ebaf1ef28f7d929df324888dc32fe191f0 (diff) | |
download | freebsd-ports-gnome-cd91a258a3250f3b82433bd7686870a7e552ebdb.tar.gz freebsd-ports-gnome-cd91a258a3250f3b82433bd7686870a7e552ebdb.tar.zst freebsd-ports-gnome-cd91a258a3250f3b82433bd7686870a7e552ebdb.zip |
Add a Mozilla Mozilla Plugable Init Script (PIS) to handle automatically
sanitizing each users' home directory when starting Firefox. This should
make upgrades much more painless.
PR: 75816
Submitted by: Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es>
Diffstat (limited to 'www/firefox/files')
-rw-r--r-- | www/firefox/files/moz_pis_S50cleanhome | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/www/firefox/files/moz_pis_S50cleanhome b/www/firefox/files/moz_pis_S50cleanhome new file mode 100644 index 000000000000..3de5565e39f2 --- /dev/null +++ b/www/firefox/files/moz_pis_S50cleanhome @@ -0,0 +1,31 @@ +#!/bin/sh +# + +# S50cleanhome +# a script to clean up users' Mozilla home directories to make upgrading +# less painful. + +# We run in our own subshell + +# First, verify protocol +[ "$1" != "start" ] && exit 1 +[ -z "${MOZ_PIS_API}" -o ${MOZ_PIS_API} -ne 2 ] && exit 1 +[ -z "${MOZ_PIS_MOZBINDIR}" -o ! -d "${MOZ_PIS_MOZBINDIR}" ] && exit 1 +[ -z "${HOME}" -o ! -d "${HOME}" ] && exit 1 +[ -z "${MOZ_PIS_USER_DIR}" -o ! -d "${HOME}/${MOZ_PIS_USER_DIR}" ] && exit 1 + +# Try to cleanup ${HOME}/${MOZ_PIS_USER_DIR} + +if [ -f "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" ]; then + sed -e '/Path=/! d' -e "s,Path=,${HOME}/${MOZ_PIS_USER_DIR}/," \ + "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" \ + | while read dir + do + [ ! -d "${dir}" ] && continue + # Debian does this for new builds + # rm -f "${dir}/XUL.mfasl" + # force a rebuild of compreg.dat and xpti.dat for new installations + [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] && + rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl" + done +fi |