From 3d601fe32066619f50297cb52131d1bbf5e6862e Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 6 May 2020 00:15:09 +0100 Subject: style: Run restyled on Travis and Circle CI scripts. --- .travis/tox-bootstrapd-docker | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to '.travis/tox-bootstrapd-docker') diff --git a/.travis/tox-bootstrapd-docker b/.travis/tox-bootstrapd-docker index bd192f07..e370118d 100755 --- a/.travis/tox-bootstrapd-docker +++ b/.travis/tox-bootstrapd-docker @@ -1,8 +1,10 @@ -#!/bin/sh +#!/bin/bash set -exu -tar c $(git ls-files) | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node - +readarray -t FILES <<<"$(git ls-files)" + +tar c "${FILES[@]}" | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node - sudo useradd \ --home-dir /var/lib/tox-bootstrapd \ --create-home \ @@ -29,12 +31,12 @@ fi COUNTER=0 COUNTER_END=120 -while [ $COUNTER -lt $COUNTER_END ]; do - if docker logs tox-bootstrapd | grep -q "Connected to another bootstrap node successfully" ; then +while [ "$COUNTER" -lt "$COUNTER_END" ]; do + if docker logs tox-bootstrapd | grep -q "Connected to another bootstrap node successfully"; then break fi sleep 1 - COUNTER=$(($COUNTER+1)) + COUNTER=$(($COUNTER + 1)) done docker logs tox-bootstrapd @@ -49,18 +51,18 @@ sleep 30 docker ps -a -if [ "`docker inspect -f {{.State.Running}} tox-bootstrapd`" != "true" ]; then +if [ "$(docker inspect -f {{.State.Running}} tox-bootstrapd)" != "true" ]; then echo "Error: Container is not running" exit 1 fi -cat /proc/$(pidof tox-bootstrapd)/limits -if ! cat /proc/$(pidof tox-bootstrapd)/limits | grep -P '^Max open files(\s+)32768(\s+)32768(\s+)files'; then +cat /proc/"$(pidof tox-bootstrapd)"/limits +if ! grep -P '^Max open files(\s+)32768(\s+)32768(\s+)files' /proc/"$(pidof tox-bootstrapd)"/limits; then echo "Error: ulimit is not set to the expected value" exit 1 fi -if ! other/fun/bootstrap_node_info.py ipv4 localhost 33445 ; then +if ! other/fun/bootstrap_node_info.py ipv4 localhost 33445; then echo "Error: Unable to get bootstrap node info" exit 1 fi -- cgit v1.2.3