Magellan Linux

Diff of /trunk/include/mozilla.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1933 by niro, Wed Jun 10 17:02:10 2009 UTC revision 2860 by niro, Sun Jul 12 16:18:50 2009 UTC
# Line 66  makemake2() Line 66  makemake2()
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    }

Legend:
Removed from v.1933  
changed lines
  Added in v.2860