Magellan Linux

Diff of /trunk/include/mozilla.sminc

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

trunk/core/include/mozilla.sminc revision 2863 by niro, Sun Jul 12 16:43:44 2009 UTC trunk/include/mozilla.sminc revision 33316 by niro, Wed Sep 16 10:26:25 2020 UTC
# Line 69  makemake2() Line 69  makemake2()
69    
70  msetpref()  msetpref()
71  {  {
72   : ${MOZILLA_PREF_CONFIG="magellan.js"}   : ${MOZILLA_PREF_CONFIG="01-magellan.js"}
73   : ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/mozilla-firefox/defaults/pref"}   case ${PNAME} in
74   local pref   *firefox*) : ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/${PNAME}/browser/defaults/preferences"} ;;
75   local value   *thunderbird*) : ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/${PNAME}/defaults/preferences"} ;;
76     esac
77     local pref="$1"
78     local value="$2"
79    
80   [[ -z ${pref} ]] && die "msetpref(): no \$pref given"   [[ -z ${pref} ]] && die "msetpref(): no \$pref given"
81    
82   if [[ ${pref} = --init ]]   if [[ ${pref} = --init ]]
83   then   then
84   # only create an empty config   # only create an empty config
85     if [[ ! -d ${BINDIR}/${MOZILLA_PREF_PATH} ]]
86     then
87     install -d ${BINDIR}/${MOZILLA_PREF_PATH} || die
88     fi
89   :> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die   :> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die
90   else   else
91   # write a pref value   # write a pref value
92   [[ -z ${value} ]] && die "msetpref(): no \$value given"   [[ -z ${value} ]] && die "msetpref(): no \$value given"
93     # respect NULL values
94     [[ ${value} = NULL ]] && value=""
95    
96   # handle escaped strings:   # handle escaped strings:
97    
# Line 105  msetpref() Line 114  msetpref()
114    
115   # eg:   # eg:
116   # pref("general.useragent.vendor","Magellan-Linux");   # pref("general.useragent.vendor","Magellan-Linux");
117   echo "pref(\"${pref}\",${value});" >> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die   echo "pref(\"${pref}\", ${value});" >> ${BINDIR}/${MOZILLA_PREF_PATH}/${MOZILLA_PREF_CONFIG} || die
118   fi   fi
119  }  }

Legend:
Removed from v.2863  
changed lines
  Added in v.33316