66 |
case ${method} in |
case ${method} in |
67 |
md5) cmd="md5sum" ;; |
md5) cmd="md5sum" ;; |
68 |
sha256) cmd="sha256sum" ;; |
sha256) cmd="sha256sum" ;; |
69 |
*) die "mchecksum(): unkown method '${method}'" ;; |
*) die "mchecksum(): unknown method '${method}'" ;; |
70 |
esac |
esac |
71 |
|
|
72 |
if [[ -d ${rundir} ]] |
if [[ -d ${rundir} ]] |
1401 |
real_uris="$(convertmirrors ${uri})" |
real_uris="$(convertmirrors ${uri})" |
1402 |
|
|
1403 |
# verbose or not |
# verbose or not |
1404 |
mqueryfeature "!verbose" && wget_opts="--quiet" |
mqueryfeature "!verbose" && wget_opts+=" --quiet" |
1405 |
|
|
1406 |
# filter wget options if busybox was found |
# filter wget options if busybox was found |
1407 |
wget_opts="$(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" |
wget_opts+=" $(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" |
1408 |
|
|
1409 |
# create outputdir |
# create outputdir |
1410 |
[[ ! -d ${outputdir} ]] && install -d "${outputdir}" |
[[ ! -d ${outputdir} ]] && install -d "${outputdir}" |
3285 |
ccache|!ccache) retval=0 ;; |
ccache|!ccache) retval=0 ;; |
3286 |
check|!check) retval=0 ;; |
check|!check) retval=0 ;; |
3287 |
compressdoc|!compressdoc) retval=0 ;; |
compressdoc|!compressdoc) retval=0 ;; |
3288 |
|
debug|!debug) retval=0 ;; |
3289 |
distcc|!distcc) retval=0 ;; |
distcc|!distcc) retval=0 ;; |
3290 |
kernelsrcunpack|!kernelsrcunpack) retval=0 ;; |
kernelsrcunpack|!kernelsrcunpack) retval=0 ;; |
3291 |
libtool|!libtool) retval=0 ;; |
libtool|!libtool) retval=0 ;; |
3294 |
purge|!purge) retval=0 ;; |
purge|!purge) retval=0 ;; |
3295 |
qalint|!qalint) retval=0 ;; |
qalint|!qalint) retval=0 ;; |
3296 |
regentree|!regentree) retval=0 ;; |
regentree|!regentree) retval=0 ;; |
3297 |
stepbystep|!stepbystep) retval=0 ;; |
resume|!resume) retval=0 ;; |
3298 |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
3299 |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
3300 |
|
static|!static) retval=0 ;; |
3301 |
|
stepbystep|!stepbystep) retval=0 ;; |
3302 |
strip|!strip) retval=0 ;; |
strip|!strip) retval=0 ;; |
3303 |
|
verbose|!verbose) retval=0 ;; |
3304 |
*) retval=1 ;; |
*) retval=1 ;; |
3305 |
esac |
esac |
3306 |
|
|
3309 |
|
|
3310 |
load_mage_features() |
load_mage_features() |
3311 |
{ |
{ |
|
echo -en "${COLBLUE}---${COLGREEN} Loading mage-features... ${COLDEFAULT}" |
|
3312 |
for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]} |
for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]} |
3313 |
do |
do |
3314 |
FVERBOSE=off msetfeature ${i} |
FVERBOSE=off msetfeature ${i} |
3315 |
done |
done |
|
|
|
|
echo -e "${COLGREEN}done${COLDEFAULT}" |
|
3316 |
} |
} |
3317 |
|
|
3318 |
msetfeature() |
msetfeature() |
3329 |
|
|
3330 |
if ! known_mage_feature "${feature}" |
if ! known_mage_feature "${feature}" |
3331 |
then |
then |
3332 |
[[ ${FVERBOSE} = off ]] || echo "unkown feature ${feature}, ignoring it" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" |
3333 |
return 3 |
return 3 |
3334 |
fi |
fi |
3335 |
|
|
3337 |
do |
do |
3338 |
if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]] |
if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]] |
3339 |
then |
then |
3340 |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled${COLDEFAULT}" |
3341 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3342 |
found=1 |
found=1 |
3343 |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]] |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]] |
3344 |
then |
then |
3345 |
[[ ${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}" |
3346 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3347 |
found=1 |
found=1 |
3348 |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]] |
elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]] |
3349 |
then |
then |
3350 |
[[ ${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}" |
3351 |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
MAGE_FEATURES_CURRENT[${i}]="${feature}" |
3352 |
found=1 |
found=1 |
3353 |
fi |
fi |
3357 |
# it was not declared. in this case enable it |
# it was not declared. in this case enable it |
3358 |
if [[ ${found} = 0 ]] |
if [[ ${found} = 0 ]] |
3359 |
then |
then |
3360 |
[[ ${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}" |
3361 |
MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" ) |
MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" ) |
3362 |
fi |
fi |
3363 |
|
|
3382 |
fi |
fi |
3383 |
done |
done |
3384 |
else |
else |
3385 |
|
[[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" |
3386 |
retval=3 |
retval=3 |
3387 |
fi |
fi |
3388 |
|
|