aboutsummaryrefslogtreecommitdiff
path: root/embed_file.sh
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-21 17:07:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-21 17:07:05 -0500
commitfff696978ff1036b4faf864276cbc55864775bd8 (patch)
tree650d31cbd2ffc2a1eff4db98d28495849d1877f5 /embed_file.sh
parent7b3a651da64e3e1951ab01e5650c5ceaa1dd5d84 (diff)
Add missing file
Diffstat (limited to 'embed_file.sh')
-rwxr-xr-xembed_file.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/embed_file.sh b/embed_file.sh
new file mode 100755
index 00000000..503fee80
--- /dev/null
+++ b/embed_file.sh
@@ -0,0 +1,10 @@
+#/bin/sh
+awk '
+ BEGIN { printf "const char *'$1' = " }
+ {
+ gsub(/\\/,"\\\\");
+ gsub(/"/,"\\\"");
+ printf "\"%s\\n\"\n", $0
+ }
+ END { print ";" }
+'