From d1f15d445b4372b7d2051e72398f4ef511c0090a Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 1 Feb 2016 13:23:51 +0100 Subject: [PATCH] iptb-lib: small cleanup License: MIT Signed-off-by: Christian Couder --- test/sharness/lib/iptb-lib.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/sharness/lib/iptb-lib.sh b/test/sharness/lib/iptb-lib.sh index 5f49fdef4..6efb4b8c7 100644 --- a/test/sharness/lib/iptb-lib.sh +++ b/test/sharness/lib/iptb-lib.sh @@ -3,16 +3,17 @@ # Copyright (c) 2014, 2016 Jeromy Johnson, Christian Couder # MIT Licensed; see the LICENSE file in this repository. -export IPTB_ROOT="`pwd`/.iptb" +export IPTB_ROOT="$(pwd)/.iptb" ipfsi() { dir="$1" shift - IPFS_PATH="$IPTB_ROOT/$dir" ipfs $@ + IPFS_PATH="$IPTB_ROOT/$dir" ipfs "$@" } check_has_connection() { - node=$1 - ipfsi $node swarm peers | grep ipfs > /dev/null + node="$1" + ipfsi "$node" swarm peers >"swarm_peers_$node" && + grep "ipfs" "swarm_peers_$node" >/dev/null }