switched out 'head' for 'dd' in order to do chunking
This commit is contained in:
parent
d80f849f4a
commit
5094f35d05
1 changed files with 2 additions and 2 deletions
|
@ -48,13 +48,13 @@ 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=$( head -c ${max_qr_bytes} )
|
s=$( dd bs=${max_qr_bytes} count=1 2>/dev/null )
|
||||||
if [ ${#s} -gt 0 ]; then
|
if [ ${#s} -gt 0 ]; then
|
||||||
chunks+=("${s}")
|
chunks+=("${s}")
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done <<< "$( cat ${asc_key} )"
|
done < ${asc_key}
|
||||||
|
|
||||||
## For each chunk, encode it into a qr image
|
## For each chunk, encode it into a qr image
|
||||||
index=1
|
index=1
|
||||||
|
|
Loading…
Reference in a new issue