summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ci/scripts/init.sh')
-rwxr-xr-xtools/ci/scripts/init.sh28
1 files changed, 17 insertions, 11 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index f427be910..92becc23b 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -3,7 +3,13 @@
export dir=$(pwd)
export ERRFILE=${dir}/logs/${LOGFILE}
-rm ${ERRFILE}
+function silent_rm {
+ if [[ -f "$1" ]]; then
+ rm "$1"
+ fi
+}
+
+silent_rm ${ERRFILE}
function do_init {
$CC --version
@@ -147,11 +153,11 @@ function check_error {
}
function run_configure_simple {
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "autoreconf -i"
autoreconf -i 2>$ERRFILE
check_error $?
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "./configure $*"
./configure $* 2>$ERRFILE
check_error $?
@@ -160,14 +166,14 @@ function run_configure_simple {
function run_configure {
run_configure_simple $*
- rm $ERRFILE
+ silent_rm $ERRFILE
cd po
echo "make update-gmo"
make update-gmo 2>$ERRFILE
check_error $?
cd ..
- rm $ERRFILE
+ silent_rm $ERRFILE
cd po
echo "make update-po"
make update-po 2>$ERRFILE
@@ -176,14 +182,14 @@ function run_configure {
}
function run_cmake {
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "cmake ."
cmake . 2>$ERRFILE
check_error $?
}
function run_make {
- rm $ERRFILE
+ silent_rm $ERRFILE
if [ "$JOBS" == "" ]; then
export JOBS=2
echo "No JOBS defined"
@@ -196,7 +202,7 @@ function run_make {
}
function run_make_check {
- rm $ERRFILE
+ silent_rm $ERRFILE
if [ "$JOBS" == "" ]; then
export JOBS=2
echo "No JOBS defined"
@@ -256,7 +262,7 @@ function run_check_warnings {
}
function run_h {
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "$CC -c -x c++ $* $includes */*/*/*/*.h */*/*/*.h */*/*.h */*.h *.h"
$CC -c -x c++ $* $includes */*/*/*/*.h */*/*/*.h */*/*.h */*.h *.h 2>$ERRFILE
DATA=$(cat $ERRFILE)
@@ -268,7 +274,7 @@ function run_h {
}
function run_tarball {
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "make dist-xz"
make dist-xz 2>$ERRFILE
check_error $?
@@ -281,7 +287,7 @@ function run_tarball {
}
function run_mplint {
- rm $ERRFILE
+ silent_rm $ERRFILE
echo "mplint/src/mplint $*"
mplint/src/mplint $* \
| grep -v "src/unittests/doctest.h" \