46 |
local method |
local method |
47 |
local cmd |
local cmd |
48 |
local retval |
local retval |
49 |
|
local sum |
50 |
|
local dest |
51 |
|
|
52 |
# very basic getops |
# very basic getops |
53 |
for i in $* |
for i in $* |
74 |
if [[ -d ${rundir} ]] |
if [[ -d ${rundir} ]] |
75 |
then |
then |
76 |
pushd ${rundir} &> /dev/null |
pushd ${rundir} &> /dev/null |
77 |
# be verbose here |
|
78 |
${cmd} -c ${file} #&> /dev/null |
# all file must be non-zero |
79 |
retval="$?" |
retval=0 |
80 |
|
while read sum dest |
81 |
|
do |
82 |
|
if [ -s ${dest} ] |
83 |
|
then |
84 |
|
echo "${dest}: file-size OK" |
85 |
|
else |
86 |
|
echo "${dest}: file is empty ;(" |
87 |
|
retval=127 |
88 |
|
fi |
89 |
|
done < ${file} |
90 |
|
if [[ ${retval} != 127 ]] |
91 |
|
then |
92 |
|
# insert an empty line for cosmetic |
93 |
|
echo |
94 |
|
|
95 |
|
# be verbose here |
96 |
|
${cmd} -c ${file} #&> /dev/null |
97 |
|
retval="$?" |
98 |
|
fi |
99 |
|
|
100 |
popd &> /dev/null |
popd &> /dev/null |
101 |
else |
else |
102 |
retval=1 |
retval=1 |
1793 |
then |
then |
1794 |
HIGHEST_MAGEFILE=${magefile} |
HIGHEST_MAGEFILE=${magefile} |
1795 |
#for debug only |
#for debug only |
1796 |
mqueryfeature "debug" && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}" |
mqueryfeature "debug" && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}" >&2 |
1797 |
fi |
fi |
1798 |
done |
done |
1799 |
|
|
3310 |
do |
do |
3311 |
if [[ -x ${busybox} ]] |
if [[ -x ${busybox} ]] |
3312 |
then |
then |
3313 |
if [[ $(readlink $(which ${cmd})) = ${busybox} ]] |
if [[ $(readlink $(type -P ${cmd})) = ${busybox} ]] |
3314 |
then |
then |
3315 |
# needs busybox support |
# needs busybox support |
3316 |
return 0 |
return 0 |