--- trunk/mage/usr/lib/mage/mage4.functions.sh 2013/08/14 07:25:43 2156 +++ trunk/mage/usr/lib/mage/mage4.functions.sh 2013/10/25 06:48:57 2268 @@ -1,6 +1,6 @@ #!/bin/bash # Magellan Linux Installer Functions (mage.functions.sh) -# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.38 2008-10-05 10:32:24 niro Exp $ +# $Id$ COLRED="\033[1;6m\033[31m" COLGREEN="\033[1;6m\033[32m" @@ -46,6 +46,8 @@ local method local cmd local retval + local sum + local dest # very basic getops for i in $* @@ -72,9 +74,24 @@ if [[ -d ${rundir} ]] then pushd ${rundir} &> /dev/null - # be verbose here - ${cmd} -c ${file} #&> /dev/null - retval="$?" + + # all file must be non-zero + retval=0 + while read sum dest + do + if [ ! -s ${dest} ] + then + echo "${dest}: file is empty ;(" + retval=127 + fi + done < ${file} + if [[ ${retval} != 127 ]] + then + # be verbose here + ${cmd} -c ${file} #&> /dev/null + retval="$?" + fi + popd &> /dev/null else retval=1 @@ -1771,7 +1788,7 @@ then HIGHEST_MAGEFILE=${magefile} #for debug only - mqueryfeature "debug" && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}" + mqueryfeature "debug" && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}" >&2 fi done @@ -3288,7 +3305,7 @@ do if [[ -x ${busybox} ]] then - if [[ $(readlink $(which ${cmd})) = ${busybox} ]] + if [[ $(readlink $(type -P ${cmd})) = ${busybox} ]] then # needs busybox support return 0 @@ -3351,7 +3368,7 @@ { local feature="$1" local retval - + case "${feature}" in autosvc|!autosvc) retval=0 ;; buildlog|!buildlog) retval=0 ;; @@ -3360,6 +3377,7 @@ compressdoc|!compressdoc) retval=0 ;; debug|!debug) retval=0 ;; distcc|!distcc) retval=0 ;; + icecc|!icecc) retval=0 ;; kernelsrcunpack|!kernelsrcunpack) retval=0 ;; libtool|!libtool) retval=0 ;; linuxsymlink|!linuxsymlink) retval=0 ;;