Magellan Linux

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

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

revision 1590 by niro, Thu Dec 29 15:12:05 2011 UTC revision 1603 by niro, Tue Jan 3 16:17:48 2012 UTC
# Line 3305  known_mage_feature() Line 3305  known_mage_feature()
3305    
3306  load_mage_features()  load_mage_features()
3307  {  {
  echo -en "${COLBLUE}---${COLGREEN} Loading mage-features... ${COLDEFAULT}"  
3308   for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]}   for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]}
3309   do   do
3310   FVERBOSE=off msetfeature ${i}   FVERBOSE=off msetfeature ${i}
3311   done   done
   
  echo -e "${COLGREEN}done${COLDEFAULT}"  
3312  }  }
3313    
3314  msetfeature()  msetfeature()
# Line 3336  msetfeature() Line 3333  msetfeature()
3333   do   do
3334   if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]]   if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]]
3335   then   then
3336   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled${COLDEFAULT}"
3337   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3338   found=1   found=1
3339   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]]   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]]
3340   then   then
3341   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!${COLDEFAULT}"
3342   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3343   found=1   found=1
3344   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]]   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]]
3345   then   then
3346   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!${COLDEFAULT}"
3347   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3348   found=1   found=1
3349   fi   fi
# Line 3356  msetfeature() Line 3353  msetfeature()
3353   # it was not declared. in this case enable it   # it was not declared. in this case enable it
3354   if [[ ${found} = 0 ]]   if [[ ${found} = 0 ]]
3355   then   then
3356   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!${COLDEFAULT}"
3357   MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" )   MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" )
3358   fi   fi
3359    

Legend:
Removed from v.1590  
changed lines
  Added in v.1603