72 |
if [[ -d ${rundir} ]] |
if [[ -d ${rundir} ]] |
73 |
then |
then |
74 |
pushd ${rundir} &> /dev/null |
pushd ${rundir} &> /dev/null |
75 |
${cmd} -c ${file} &> /dev/null |
# be verbose here |
76 |
|
${cmd} -c ${file} #&> /dev/null |
77 |
retval="$?" |
retval="$?" |
78 |
popd &> /dev/null |
popd &> /dev/null |
79 |
else |
else |
1565 |
|
|
1566 |
for mirr in ${MIRRORS} |
for mirr in ${MIRRORS} |
1567 |
do |
do |
1568 |
# path without distribution |
# path without distribution |
1569 |
mymirr="${mirr%/*}" |
# (only for stable|testing|unstable and not DISTROTAG) |
1570 |
|
case ${mirr##*/} in |
1571 |
|
stable|testing|unstable) mymirr="${mirr%/*}";; |
1572 |
|
*) mymirr="${mirr}";; |
1573 |
|
esac |
1574 |
|
|
1575 |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
1576 |
echo "fetching latest md5 from ${mymirr} ..." |
echo "fetching latest md5 from ${mymirr} ..." |
1610 |
then |
then |
1611 |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
1612 |
echo "cleaning old mage-tree ${MAGEDIR}..." |
echo "cleaning old mage-tree ${MAGEDIR}..." |
1613 |
rm -rf ${MAGEDIR} |
# honor mountpoints and empty dirs |
1614 |
|
if mountpoint -q ${MAGEDIR} |
1615 |
|
then |
1616 |
|
if ! mcheckemptydir ${MAGEDIR} |
1617 |
|
then |
1618 |
|
find ${MAGEDIR} -mindepth 1 -maxdepth 1 | xarg --no-run-if-empty rm -r |
1619 |
|
fi |
1620 |
|
else |
1621 |
|
rm -rf ${MAGEDIR} |
1622 |
|
fi |
1623 |
fi |
fi |
1624 |
|
|
1625 |
if need_busybox_support tar |
if need_busybox_support tar |