serenity/Meta/text-to-cpp-string.sh
Andreas Kling 87ad68c75b Meta: Use a raw string delimiter in text-to-cpp-string.sh
Otherwise we can't have the sequence ')"' in GML :^)
2020-12-31 23:31:22 +01:00

11 lines
212 B
Bash
Executable file

#!/bin/sh
# $1 name of the variable
# $2 input path
echo "extern const char $1[];"
printf "const char %s[] = R\"~~~(" "$1"
grep -v '^ *#' < "$2" | while IFS= read -r line; do
echo "$line"
done
echo ")~~~\";"