"
for f in $LOGFILES; do
if [ -r $f ]; then
LOGFILESIZE=`stat -c %s $f`
LOGDATE=`stat -c %y $f`
else
LOGFILESIZE=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "stat -c %s $f"`
LOGDATE=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "stat -c %y $f"`
[ $? -eq 0 ] || continue
fi
echo -n "
`basename $f` ($LOGDATE; $LOGFILESIZE):"
echo -n "
"
if [ "$LOGTYPE" = "processtail" ]; then
echo -n ""
tail -n +0 -f $f --pid $PROCESSPID | sed "s|<|\<|g"
echo -n ""
else
if [ $LOGFILESIZE -lt 524288 ]; then
if [ -r $f ]; then
cat $f | parse_build_output $PACKAGE
else
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "cat $f" | parse_build_output $PACKAGE
fi
else
if [ -r $f ]; then
head -c 262144 $f | parse_build_output $PACKAGE
echo "
<------ CUT (long file) ------->"
tail -c 262144 $f | parse_build_output $PACKAGE
else
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "head -c 262144 $f" | parse_build_output $PACKAGE
echo "
<------ CUT (long file) ------->"
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "tail -c 262144 $f" | parse_build_output $PACKAGE
fi
fi
fi
echo -n "
"
done
echo -n "
]]>