Skip to content

Commit

Permalink
Add missing checks and fix hexdump output (closes #878)
Browse files Browse the repository at this point in the history
  • Loading branch information
krayon authored and lukas2511 committed Oct 31, 2022
1 parent 6fb8eba commit 6091ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dehydrated
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ _mktemp() {
# Check for script dependencies
check_dependencies() {
# look for required binaries
for binary in grep mktemp diff sed awk curl cut; do
for binary in grep mktemp diff sed awk curl cut head tail hexdump; do
bin_path="$(command -v "${binary}" 2>/dev/null)" || _exiterr "This script requires ${binary}."
[[ -x "${bin_path}" ]] || _exiterr "${binary} found in PATH but it's not executable"
done
Expand Down Expand Up @@ -839,7 +839,7 @@ hex2bin() {

# Convert binary data to hex string
bin2hex() {
hexdump -e '16/1 "%02x"'
hexdump -v -e '/1 "%02x"'
}

# OpenSSL writes to stderr/stdout even when there are no errors. So just
Expand Down

0 comments on commit 6091ba4

Please sign in to comment.