Skip to content

Commit

Permalink
Replace which with command
Browse files Browse the repository at this point in the history
  • Loading branch information
HacKanCuBa committed Feb 9, 2020
1 parent 03a59dd commit cc99e1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/b2rsum.bash
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ check_dependencies() {
DEPENDENCIES=( "b2sum" "getopt" )
result=0
for dep in "${DEPENDENCIES[@]}"; do
which "$dep" > /dev/null 2>&1
command -v "$dep" > /dev/null 2>&1
result=$((result | $?))
done
return $result
Expand Down Expand Up @@ -283,6 +283,7 @@ check_dependencies || die "Dependencies not met, can't continue"

# Arguments
OPTS="$(getopt -o hbctwsql:o:: -l help,version,license,binary,check,length:,text,tag,ignore-missing,quiet,status,strict,warn,output:: -n "$PROGRAM" -- "$@")"
# shellcheck disable=SC2181
[[ $? -ne 0 ]] && die "Wrong option. Try '$PROGRAM --help' for more information."

eval set -- "$OPTS"
Expand Down

0 comments on commit cc99e1a

Please sign in to comment.