3293 |
purge|!purge) retval=0 ;; |
purge|!purge) retval=0 ;; |
3294 |
qalint|!qalint) retval=0 ;; |
qalint|!qalint) retval=0 ;; |
3295 |
regentree|!regentree) retval=0 ;; |
regentree|!regentree) retval=0 ;; |
3296 |
|
resume|!resume) retval=0 ;; |
3297 |
stepbystep|!stepbystep) retval=0 ;; |
stepbystep|!stepbystep) retval=0 ;; |
3298 |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
3299 |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
3306 |
|
|
3307 |
load_mage_features() |
load_mage_features() |
3308 |
{ |
{ |
|
echo "loading mage-features... " |
|
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 |
|
|
|
|
echo "done" |
|
3313 |
} |
} |
3314 |
|
|
3315 |
msetfeature() |
msetfeature() |
3334 |
do |
do |
3335 |
if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]] |
if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]] |
3336 |
then |
then |
3337 |
[[ ${FVERBOSE} = off ]] || echo "feature '${feature}' already enabled" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled${COLDEFAULT}" |
3338 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3339 |
found=1 |
found=1 |
3340 |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]] |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]] |
3341 |
then |
then |
3342 |
[[ ${FVERBOSE} = off ]] || echo "feature '${feature}' currently disabled, enabling it!" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!${COLDEFAULT}" |
3343 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3344 |
found=1 |
found=1 |
3345 |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]] |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]] |
3346 |
then |
then |
3347 |
[[ ${FVERBOSE} = off ]] || echo "feature '${feature//!}' currently enabled, disabling it!" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!${COLDEFAULT}" |
3348 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3349 |
found=1 |
found=1 |
3350 |
fi |
fi |
3354 |
# it was not declared. in this case enable it |
# it was not declared. in this case enable it |
3355 |
if [[ ${found} = 0 ]] |
if [[ ${found} = 0 ]] |
3356 |
then |
then |
3357 |
[[ ${FVERBOSE} = off ]] || echo "feature '${feature}' was not declared, enabling it!" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!${COLDEFAULT}" |
3358 |
MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" ) |
MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" ) |
3359 |
fi |
fi |
3360 |
|
|