Skip to content

Commit

Permalink
Fix MCU script transformation logic.
Browse files Browse the repository at this point in the history
The old script behaved incorrectly as it replaced all '*' occurrences
with the list of files in the given directory.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
  • Loading branch information
galpeter committed Jun 17, 2015
1 parent d803c3b commit c0c4f8a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
# limitations under the License.

echo "#define JERRY_MCU_SCRIPT \\" > $2
cat $1 | while read line
do
line=$(echo $line | sed 's/"/\\"/g')
echo "\"$line\n\" \\" >> $2
done
# escape all " characters, wrap each line in double quotes and end the line with '\'
sed 's/"/\\"/g' $1 | sed 's/^.*$/"\0" \\/g' >> $2
echo >> $2

0 comments on commit c0c4f8a

Please sign in to comment.