Magellan Linux

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

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

revision 1758 by niro, Sat Feb 18 13:48:34 2012 UTC revision 1961 by niro, Thu Oct 25 07:07:28 2012 UTC
# Line 1898  count_protected_files() Line 1898  count_protected_files()
1898   fi   fi
1899   done   done
1900    
1901   count="${count}+1"   count="$(( ${count}+1 ))"
1902    
1903   # fill output up with zeros   # fill output up with zeros
1904   for (( i=${#count}; i < 4; i++ )); do output="${output}0"; done   for (( i=${#count}; i < 4; i++ )); do output="${output}0"; done
# Line 3119  pkgsearch() Line 3119  pkgsearch()
3119   "") continue;;   "") continue;;
3120   esac   esac
3121    
3122   deps="${deps} $(basename ${dep%-*})"   if [[ -z ${deps} ]]
3123     then
3124     deps="$(basename ${dep%-*})"
3125     else
3126     deps="${deps} $(basename ${dep%-*})"
3127     fi
3128   done << EOF   done << EOF
3129  ${depsfull}  ${depsfull}
3130  EOF  EOF
# Line 3130  EOF Line 3135  EOF
3135   "") continue;;   "") continue;;
3136   esac   esac
3137    
3138   sdeps="${sdeps} $(basename ${dep%-*})"   if [[ -z ${sdeps} ]]
3139     then
3140     sdeps="$(basename ${dep%-*})"
3141     else
3142     sdeps="${sdeps} $(basename ${dep%-*})"
3143     fi
3144   done << EOF   done << EOF
3145  ${sdepsfull}  ${sdepsfull}
3146  EOF  EOF
# Line 3144  EOF Line 3154  EOF
3154   then   then
3155   echo "      License:  ${license}"   echo "      License:  ${license}"
3156   fi   fi
3157   echo "      Depends: ${deps}"   echo "      Depends:  ${deps}"
3158   echo "      SDepends: ${sdeps}"   echo "      SDepends: ${sdeps}"
3159   echo   echo
3160    
# Line 3261  EOF Line 3271  EOF
3271  need_busybox_support()  need_busybox_support()
3272  {  {
3273   local cmd   local cmd
3274     local busybox
3275   cmd="$1"   cmd="$1"
3276    
3277   if [[ -x /bin/busybox ]]   for busybox in {,/usr}/bin/busybox
3278   then   do
3279   if [[ $(readlink $(which ${cmd})) = /bin/busybox ]]   if [[ -x ${busybox} ]]
3280   then   then
3281   # needs busybox support   if [[ $(readlink $(which ${cmd})) = ${busybox} ]]
3282   return 0   then
3283     # needs busybox support
3284     return 0
3285     fi
3286   fi   fi
3287   fi   done
3288    
3289   # no busybox   # no busybox
3290   return 1   return 1
# Line 3441  mqueryfeature() Line 3455  mqueryfeature()
3455    
3456  mprintfeatures()  mprintfeatures()
3457  {  {
3458   echo "Global features:  ${MAGE_FEATURES_GLOBAL[*]}"   echo -e "${COLRED}Global features:${COLDEFAULT} ${MAGE_FEATURES_GLOBAL[*]}"
3459   echo "Local features:   ${MAGE_FEATURES[*]}"   echo -e "${COLYELLOW}Local features:${COLDEFAULT} ${MAGE_FEATURES[*]}"
3460   echo "Current features: ${MAGE_FEATURES_CURRENT[*]}"   echo -e "${COLGREEN}Current features:${COLDEFAULT} ${MAGE_FEATURES_CURRENT[*]}"
3461  }  }

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