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 1963 by niro, Fri Oct 26 21:14:51 2012 UTC
# Line 1605  syncmage_tarball() Line 1605  syncmage_tarball()
1605   then   then
1606   if ! mcheckemptydir ${MAGEDIR}   if ! mcheckemptydir ${MAGEDIR}
1607   then   then
1608   find ${MAGEDIR} -mindepth 1 -maxdepth 1 | xarg --no-run-if-empty rm -r   find ${MAGEDIR} -mindepth 1 -maxdepth 1 | xargs --no-run-if-empty rm -r
1609   fi   fi
1610   else   else
1611   rm -rf ${MAGEDIR}   rm -rf ${MAGEDIR}
# 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.1963