git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

scenefx/render/fx_renderer/shaders/embed.sh (164B)

 1 #!/bin/sh -eu
 2 
 3 var=${1:-data}
 4 hex="$(od -A n -t x1 -v)"
 5 
 6 echo "static const char $var[] = {"
 7 for byte in $hex; do
 8     echo "	0x$byte,"
 9 done
10 echo "	0x00,"
11 echo "};"