Magellan Linux

Diff of /trunk/include/mozilla.sminc

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

revision 2861 by niro, Sun Jul 12 16:33:09 2009 UTC revision 2867 by niro, Sun Jul 12 17:40:30 2009 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"}   : ${MOZILLA_PREF_PATH="/usr/$(mlibdir)/mozilla-firefox/defaults/pref"}
74   local pref   local pref="$1"
75   local value   local value="$2"
76    
77   [[ -z ${pref} ]] && die "msetpref(): no \$pref given"   [[ -z ${pref} ]] && die "msetpref(): no \$pref given"
78    
# Line 85  msetpref() Line 85  msetpref()
85   [[ -z ${value} ]] && die "msetpref(): no \$value given"   [[ -z ${value} ]] && die "msetpref(): no \$value given"
86    
87   # handle escaped strings:   # handle escaped strings:
88    
89   # check if value is an integer -> no escaping   # check if value is an integer -> no escaping
90   if printf "%d" ${value} > /dev/null 2>&1   #if printf "%d" ${value} > /dev/null 2>&1
91     # the better way (only use one! bracket!!)
92     if [ "${value}" -eq "${value}" ] > /dev/null 2>&1
93   then   then
94   value="${value}"   value="${value}"
95    
96   # check for "false" or "true" -> no escaping   # check for "false" or "true" -> no escaping
97   elif [[ ${value} = false ]] || [[ ${value} = true ]]   elif [[ ${value} = false ]] || [[ ${value} = true ]]
98     then
99   value="${value}"   value="${value}"
100    
101   # all other values needs escaping   # all other values needs escaping

Legend:
Removed from v.2861  
changed lines
  Added in v.2867