Magellan Linux

Diff of /branches/mage-next/src/mage4.functions.sh

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

revision 1584 by niro, Wed Dec 28 12:23:50 2011 UTC revision 1590 by niro, Thu Dec 29 15:12:05 2011 UTC
# Line 3305  known_mage_feature() Line 3305  known_mage_feature()
3305    
3306  load_mage_features()  load_mage_features()
3307  {  {
3308   echo "loading mage-features... "   echo -en "${COLBLUE}---${COLGREEN} Loading mage-features... ${COLDEFAULT}"
3309   for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]}   for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]}
3310   do   do
3311   FVERBOSE=off msetfeature ${i}   FVERBOSE=off msetfeature ${i}
3312   done   done
3313    
3314   echo "done"   echo -e "${COLGREEN}done${COLDEFAULT}"
3315  }  }
3316    
3317  msetfeature()  msetfeature()
# Line 3336  msetfeature() Line 3336  msetfeature()
3336   do   do
3337   if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]]   if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]]
3338   then   then
3339   [[ ${FVERBOSE} = off ]] || echo "feature '${feature}' already enabled"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled"
3340   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3341   found=1   found=1
3342   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]]   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]]
3343   then   then
3344   [[ ${FVERBOSE} = off ]] || echo "feature '${feature}' currently disabled, enabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!"
3345   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3346   found=1   found=1
3347   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]]   elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]]
3348   then   then
3349   [[ ${FVERBOSE} = off ]] || echo "feature '${feature//!}' currently enabled, disabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!"
3350   MAGE_FEATURES_CURRENT[${i}]="${feature}"   MAGE_FEATURES_CURRENT[${i}]="${feature}"
3351   found=1   found=1
3352   fi   fi
# Line 3356  msetfeature() Line 3356  msetfeature()
3356   # it was not declared. in this case enable it   # it was not declared. in this case enable it
3357   if [[ ${found} = 0 ]]   if [[ ${found} = 0 ]]
3358   then   then
3359   [[ ${FVERBOSE} = off ]] || echo "feature '${feature}' was not declared, enabling it!"   [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!"
3360   MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" )   MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" )
3361   fi   fi
3362    

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