Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
setup-postgres.sh: simpler test for pv utility command
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurty committed Sep 15, 2016
1 parent 2d6dd00 commit a2a9d3d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions icekit/bin/setup-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ EOF

set -e

# Is the `pv` utility available
if [[ `pv --help > /dev/null 2>&1` ]]; then
PV_CMD=pv
else
PV_CMD=cat
fi
# If the `pv` utility isn't available fall back to `cat`
pv --help > /dev/null 2>&1 && PV_CMD=pv || PV_CMD=cat

# Wait for PostgreSQL to become available.
COUNT=0
Expand Down

0 comments on commit a2a9d3d

Please sign in to comment.