jerryscript/tools/check-doxygen.sh
Akos Kiss 17eb78aa63 Don't use a shell variable to store error output of doxygen (#2455)
Storing the error output of doxygen into a shell variable first and
echoing it later is error prone. In case of a long error output,
the whole shell will crash before being able to print the doxygen
diagnostics at all. This patch rewrites the check script to tee the
diagnostics (pipe them to console and store them to a file at the
same time) and check the output file size at the end.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-09 10:26:09 +02:00

26 lines
769 B
Bash
Executable File

#!/bin/bash
# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
doxygen 2>&1 >/dev/null | head -n 1000 | tee doxygen.log
if [ -s doxygen.log ]
then
EXIT=1
else
EXIT=0
fi
rm -f doxygen.log
exit $EXIT