Changed ugly xxd to literals.
HPP files are much more readable as multiline literals rather than hex arrays.
This commit is contained in:
parent
fea4fd4ba7
commit
fd0ad6e521
1 changed files with 8 additions and 1 deletions
|
@ -16,5 +16,12 @@ for FILE in $FILES; do
|
|||
echo "generate $FILE.hpp"
|
||||
|
||||
# use simple flag for old version of xxd
|
||||
xxd -i $FILE > $DIR/$FILE.hpp
|
||||
f=$(echo $FILE | sed 's/\./_/g')
|
||||
echo "const char $f[] = R\"LITERAL(" > $DIR/$FILE.hpp
|
||||
cat $FILE >> $DIR/$FILE.hpp
|
||||
echo ")LITERAL\";" >> $DIR/$FILE.hpp
|
||||
echo "unsigned int ${f}_len = sizeof($f);" >> $DIR/$FILE.hpp
|
||||
|
||||
#Deprecated old xxd
|
||||
#xxd -i $FILE > $DIR/$FILE.hpp
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue