Skip to content

Commit

Permalink
Escape '"' character from the generated script
Browse files Browse the repository at this point in the history
Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
  • Loading branch information
giulianobelinassi committed May 31, 2024
1 parent dc3e501 commit 2d8b23f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/extract-ce-cmdline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ parse_program_argv()

generate_script()
{

# Get the pwd where clang-extract was run.
local string_pwd=$(sed -nr 's/Executing ce on (.*)/\1/p' $INPUT_FILE)
local found_ce=0
Expand All @@ -94,7 +95,7 @@ generate_script()
if [ $WITH_GDB -eq 1 ]; then
echo 'gdb -args ' $line '\' >> $OUTPUT_FILE
else
echo $line '\' >> $OUTPUT_FILE
echo $line '\' | sed 's/"/\\"/g' >> $OUTPUT_FILE
fi
fi
else
Expand All @@ -104,7 +105,7 @@ generate_script()
break
fi

echo $line '\' >> $OUTPUT_FILE
echo $line '\' | sed 's/"/\\"/g' >> $OUTPUT_FILE
fi
done < $INPUT_FILE

Expand Down

0 comments on commit 2d8b23f

Please sign in to comment.