Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage4.functions.sh

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

revision 1961 by niro, Thu Oct 25 07:07:28 2012 UTC revision 1962 by niro, Thu Oct 25 07:17:17 2012 UTC
# Line 1887  count_protected_files() Line 1887  count_protected_files()
1887   count="$(echo ${oldprotected} | sed 's:.*\/._cfg\(.*\)_.*:\1:')"   count="$(echo ${oldprotected} | sed 's:.*\/._cfg\(.*\)_.*:\1:')"
1888   done   done
1889    
1890   # dirty hack to convert 0001 -> 1; 0120 -> 120 etc   # convert 0001 -> 1; 0120 -> 120 etc
1891   x="${#count}"   # use bash internal base functions to this task
1892     x="$((10#${count}))"
1893   for (( i=0; i<x; i++ ))   for (( i=0; i<x; i++ ))
1894   do   do
1895   if [[ ${count:${i}:1} != 0 ]]   if [[ ${count:${i}:1} != 0 ]]

Legend:
Removed from v.1961  
changed lines
  Added in v.1962