mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
test-network.sh: Use "/bin/echo -n" rather than builtin echo
The default shell on OS X is bash, which has a builtin echo. When called in "sh" mode, this echo does not accept "-n". This patch uses "/bin/echo -n" instead. Partially fixes issue 13161.
This commit is contained in:
parent
b448ec195d
commit
7c0215f8ca
3
changes/bug13161-test-network-echo-n
Normal file
3
changes/bug13161-test-network-echo-n
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- Stop using "echo -n", as some shells' built-in echo doesn't support
|
||||
"-n". Instead, use "/bin/echo -n". Partially fixes bug 13161.
|
@ -1,5 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
ECHO_N="/bin/echo -n"
|
||||
|
||||
until [ -z $1 ]
|
||||
do
|
||||
case $1 in
|
||||
@ -40,8 +42,8 @@ PATH="$TOR_DIR/src/or:$TOR_DIR/src/tools:$PATH"
|
||||
# Sleep some, waiting for the network to bootstrap.
|
||||
# TODO: Add chutney command 'bootstrap-status' and use that instead.
|
||||
BOOTSTRAP_TIME=18
|
||||
echo -n "$myname: sleeping for $BOOTSTRAP_TIME seconds"
|
||||
$ECHO_N "$myname: sleeping for $BOOTSTRAP_TIME seconds"
|
||||
n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do
|
||||
sleep 1; n=$(expr $n - 1); echo -n .
|
||||
sleep 1; n=$(expr $n - 1); $ECHO_N .
|
||||
done; echo ""
|
||||
./chutney verify $CHUTNEY_NETWORK
|
||||
|
Loading…
Reference in New Issue
Block a user