Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

Commit c672e07

Browse files
committed
s/while read/while read -r/
1 parent 308c626 commit c672e07

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

boot2docker-depowify

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -u
55
POW_HOST_ROOT=${POW_HOST_ROOT:-$HOME/Library/Application Support/Pow/Hosts}
66

77
for_each() {
8-
while read line; do
8+
while read -r line; do
99
[[ -n "$line" ]] || continue
1010
"$@" $line
1111
done
@@ -23,7 +23,7 @@ rm_proxy_conf() {
2323

2424
stop_port_forwarding() {
2525
local port=$1
26-
pgrep boot2docker | while read pid; do
26+
pgrep boot2docker | while read -r pid; do
2727
local forwarder="boot2docker ssh -N -L $port:0.0.0.0:$port"
2828
if [[ $(ps -o command= $pid) = "$forwarder" ]]; then
2929
# Kill ssh spawned by boot2docker ssh.
@@ -68,7 +68,7 @@ filter_by_name() {
6868
cat
6969
return
7070
fi
71-
while read line; do
71+
while read -r line; do
7272
local name=$(cut -d' ' -f2 <<< $line)
7373
if grep -q " $name " <<< " $target_names "; then
7474
echo $line

boot2docker-powify

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -u
55
POW_HOST_ROOT=${POW_HOST_ROOT:-$HOME/Library/Application Support/Pow/Hosts}
66

77
for_each() {
8-
while read line; do
8+
while read -r line; do
99
[[ -n "$line" ]] || continue
1010
"$@" $line
1111
done
@@ -23,7 +23,7 @@ start_port_forwarding() {
2323
local port=$1
2424
local forwarder="boot2docker ssh -N -L $port:0.0.0.0:$port"
2525
local forwarder_exists=
26-
pgrep boot2docker | while read pid; do
26+
pgrep boot2docker | while read -r pid; do
2727
if [[ $(ps -o command= $pid) = "$forwarder" ]]; then
2828
echo "Port $port is already forwarded"
2929
return 99
@@ -53,7 +53,7 @@ filter_by_name() {
5353
cat
5454
return
5555
fi
56-
while read line; do
56+
while read -r line; do
5757
local name=$(cut -d' ' -f2 <<< $line)
5858
if grep -q " $name " <<< " $target_names "; then
5959
echo $line

0 commit comments

Comments
 (0)