Skip to content

Commit

Permalink
Merge pull request #8 from jjehannet/master
Browse files Browse the repository at this point in the history
Simplify checkdep function
  • Loading branch information
aurelg authored Nov 23, 2018
2 parents d64d739 + 5c965be commit 0a7ca5a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ipfs-wormhole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@ if [ -z "${IWIPFSGATEWAY-}" ]; then
fi

# Check deps

function checkdep() {
set +e
CMDPATH="$(command -v "${1:-}")"
set -e
if [ -z "$CMDPATH" ]; then
if ! command -pv "${1:-}"; then
echo >&2 "${1:-} not found"
exit 1
fi
echo "$CMDPATH"
}

# Generate Password
Expand Down

0 comments on commit 0a7ca5a

Please sign in to comment.