70 |
msetpref() |
msetpref() |
71 |
{ |
{ |
72 |
: ${MOZILLA_PREF_CONFIG="01-magellan.js"} |
: ${MOZILLA_PREF_CONFIG="01-magellan.js"} |
73 |
: ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/mozilla-firefox/defaults/pref"} |
: ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/${PNAME}/defaults/preferences"} |
74 |
local pref="$1" |
local pref="$1" |
75 |
local value="$2" |
local value="$2" |
76 |
|
|
79 |
if [[ ${pref} = --init ]] |
if [[ ${pref} = --init ]] |
80 |
then |
then |
81 |
# only create an empty config |
# only create an empty config |
82 |
|
if [[ ! -d ${BINDIR}/${MOZILLA_PREF_PATH} ]] |
83 |
|
then |
84 |
|
install -d ${BINDIR}/${MOZILLA_PREF_PATH} || die |
85 |
|
fi |
86 |
:> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die |
:> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die |
87 |
else |
else |
88 |
# write a pref value |
# write a pref value |