switched to read instead of 'dd'

This commit is contained in:
Brock A. Martin 2016-07-26 21:49:29 -05:00
parent 5094f35d05
commit 9aa3a998d4

View file

@ -48,7 +48,7 @@ fi
## Split the key file into usable chunks that the QR encoder can consume ## Split the key file into usable chunks that the QR encoder can consume
chunks=() chunks=()
while true; do while true; do
s=$( dd bs=${max_qr_bytes} count=1 2>/dev/null ) IFS= read -r -d'\0' -n ${max_qr_bytes} s
if [ ${#s} -gt 0 ]; then if [ ${#s} -gt 0 ]; then
chunks+=("${s}") chunks+=("${s}")
else else