Dashes in literal variable names.

Replace . and - with _ in file names -> variable names.
This commit is contained in:
JohnnyB 2024-01-30 18:04:13 +00:00 committed by GitHub
parent fd0ad6e521
commit fccec2a813
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ for FILE in $FILES; do
echo "generate $FILE.hpp" echo "generate $FILE.hpp"
# use simple flag for old version of xxd # use simple flag for old version of xxd
f=$(echo $FILE | sed 's/\./_/g') f=$(echo $FILE | sed 's/\./_/g' -e 's/-/_/g')
echo "const char $f[] = R\"LITERAL(" > $DIR/$FILE.hpp echo "const char $f[] = R\"LITERAL(" > $DIR/$FILE.hpp
cat $FILE >> $DIR/$FILE.hpp cat $FILE >> $DIR/$FILE.hpp
echo ")LITERAL\";" >> $DIR/$FILE.hpp echo ")LITERAL\";" >> $DIR/$FILE.hpp