mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-05-17 12:26:55 +02:00
Add missing checks and fix hexdump output (closes #878)
This commit is contained in:
+2
-2
@@ -260,7 +260,7 @@ _mktemp() {
|
|||||||
# Check for script dependencies
|
# Check for script dependencies
|
||||||
check_dependencies() {
|
check_dependencies() {
|
||||||
# look for required binaries
|
# 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}."
|
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"
|
[[ -x "${bin_path}" ]] || _exiterr "${binary} found in PATH but it's not executable"
|
||||||
done
|
done
|
||||||
@@ -839,7 +839,7 @@ hex2bin() {
|
|||||||
|
|
||||||
# Convert binary data to hex string
|
# Convert binary data to hex string
|
||||||
bin2hex() {
|
bin2hex() {
|
||||||
hexdump -e '16/1 "%02x"'
|
hexdump -v -e '/1 "%02x"'
|
||||||
}
|
}
|
||||||
|
|
||||||
# OpenSSL writes to stderr/stdout even when there are no errors. So just
|
# OpenSSL writes to stderr/stdout even when there are no errors. So just
|
||||||
|
|||||||
Reference in New Issue
Block a user