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.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index 656a4d765..9512e9b66 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -41,10 +41,8 @@ function update_repos {
echo "Running from shell. Skipping update repos"
return
fi
- export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
- echo "${DATA}"
- if [ "$DATA" != "" ];
- then
+
+ if grep "nameserver 1.10.100.101" /etc/resolv.conf; then
echo "Detected local runner"
sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
sed -i 's!http://deb.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
@@ -206,9 +204,7 @@ function run_gcov {
}
function run_check_warnings {
- DATA=$(cat $ERRFILE)
- if [ "$DATA" != "" ];
- then
+ if [[ -s "$ERRFILE" ]]; then
cat $ERRFILE
exit 1
fi
@@ -218,9 +214,7 @@ function run_h {
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)
- if [ "$DATA" != "" ];
- then
+ if [[ -s "$ERRFILE" ]]; then
cat $ERRFILE
exit 1
fi