mirror of https://github.com/digint/btrbk
btrbk-verify: expect single quotes from btrbk raw table output
parent
81a04e4287
commit
af5d25c5a9
|
@ -302,7 +302,7 @@ start_ssh_agent()
|
|||
|
||||
eval_btrbk_resolved_line()
|
||||
{
|
||||
local line=$1
|
||||
local line=" $1"
|
||||
local prefix=$2
|
||||
local required_keys=$3
|
||||
# reset all variables first
|
||||
|
@ -311,7 +311,7 @@ eval_btrbk_resolved_line()
|
|||
done
|
||||
for vv in $required_keys; do
|
||||
# basic input validation, set prefixed variable (eval)
|
||||
local match="${vv}"'="([^"]*)"'
|
||||
local match=" ${vv}='([^']*('\\\\''[^']*)*)'"
|
||||
if [[ $line =~ $match ]] ; then
|
||||
eval "${prefix}${vv}='${BASH_REMATCH[1]}'" || return 1
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue