diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-29 13:19:20 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-06-08 12:36:30 -0400 |
commit | 34e133bd0e2d5bb4eed5d5091d14d9e6fce1ff2b (patch) | |
tree | 2abf64518759de4a84d4ac08e218021e9643d3f8 /build/embed.sh | |
parent | 778295321928767552ebc577f15e88c17da4c1c9 (diff) | |
download | bfs-34e133bd0e2d5bb4eed5d5091d14d9e6fce1ff2b.tar.xz |
Embed more configuration info in bfs --version
Diffstat (limited to 'build/embed.sh')
-rwxr-xr-x | build/embed.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build/embed.sh b/build/embed.sh new file mode 100755 index 0000000..8d7d0f1 --- /dev/null +++ b/build/embed.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Copyright © Tavian Barnes <tavianator@tavianator.com> +# SPDX-License-Identifier: 0BSD + +# Convert data into a C array like #embed + +set -eu + +{ cat; printf '\0'; } \ + | od -An -tx1 \ + | sed 's/\([^ ][^ ]*\)/0x\1,/g' |