66 |
< ${m} > ${m%.in} || die "sed ${m} failed" |
< ${m} > ${m%.in} || die "sed ${m} failed" |
67 |
done |
done |
68 |
} |
} |
69 |
|
|
70 |
|
msetpref() |
71 |
|
{ |
72 |
|
: ${MOZILLA_PREF_CONFIG="magellan.js"} |
73 |
|
: ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/mozilla-firefox/defaults/pref"} |
74 |
|
local pref |
75 |
|
local value |
76 |
|
|
77 |
|
[[ -z ${pref} ]] && die "msetpref(): no \$pref given" |
78 |
|
|
79 |
|
if [[ ${pref} = --init ]] |
80 |
|
then |
81 |
|
# only create an empty config |
82 |
|
:> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die |
83 |
|
else |
84 |
|
# write a pref value |
85 |
|
[[ -z ${value} ]] && die "msetpref(): no \$value given" |
86 |
|
|
87 |
|
# eg: |
88 |
|
# pref("general.useragent.vendor","Magellan-Linux"); |
89 |
|
echo "pref(\"${pref}\",\"${value}\");" >> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die |
90 |
|
fi |
91 |
|
} |