server : change deps.sh xxd files to string literals (#5221)

* Changed ugly xxd to literals.

HPP files are much more readable as multiline literals rather than hex arrays.

* Dashes in literal variable names.

Replace . and - with _ in file names -> variable names.

* Comment on removing xxd.

XXD-> string literals

* XXD to string literals.

Replaced these unreadable headers with string literal versions using new deps.sh.
This commit is contained in:
JohnnyB 2024-01-30 12:15:05 -06:00 committed by GitHub
parent fea4fd4ba7
commit 4003be0e5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1368 additions and 5454 deletions

View file

@ -15,6 +15,13 @@ cd $PUBLIC
for FILE in $FILES; do
echo "generate $FILE.hpp"
# use simple flag for old version of xxd
xxd -i $FILE > $DIR/$FILE.hpp
# Use C++11 string literals instead of ugly xxd.
f=$(echo $FILE | sed 's/\./_/g' -e '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