[tools/bgpscanner] Fix -o quoting (and options quoting in case PRETEND=y)

This commit is contained in:
Lorenzo Cogotti 2021-08-11 23:46:55 +02:00
parent 705670d682
commit 39dac63d82
1 changed files with 2 additions and 1 deletions

View File

@ -321,11 +321,12 @@ exprcompile
[ "$TGT" = bgpgrep ] && [ "$DUMPBYTEC" = yes ] && OPTS=$(append "$OPTS" --dump-bytecode)
[ "$TGT" != bgpgrep ] && OPTS=-r
[ -n "$OUTREDIR" ] && OPTS=$(append "$OPTS" "-o $OUTREDIR")
[ -n "$OUTREDIR" ] && OPTS=$(append "$OPTS" "-o \"$OUTREDIR\"")
CMD="exec"
if [ -n "$PRETEND" ] && [ "$PRETEND" = 1 ] || [ "$PRETEND" = y ] || [ "$PRETEND" = yes ]; then
CMD="echo"
OPTS=$(quote "$OPTS")
EXPR=$(quote "$EXPR")
fi