use od instead of xxd

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Ari Archer 2024-05-04 01:50:15 +03:00
parent 1f21196614
commit e6419975df
No known key found for this signature in database
GPG key ID: A50D5B4B599AF8A2
2 changed files with 4 additions and 2 deletions

View file

@ -13,6 +13,7 @@ As the creator of Neofetch has [picked up farming](https://github.com/dylanaraps
- yt-dlp or youtube-dl (for downloading videos off YouTube, you can change that with `YT=...`) - yt-dlp or youtube-dl (for downloading videos off YouTube, you can change that with `YT=...`)
- LibMPV & Libpthread (if you have `LIBMPV=1`) - LibMPV & Libpthread (if you have `LIBMPV=1`)
- BASH - BASH
- `od` utility (for audio)
# Compiling # Compiling

View file

@ -5,8 +5,9 @@ set -eu
main() { main() {
echo "#include <stdint.h>" echo "#include <stdint.h>"
echo "const unsigned char audio[] = {" echo "const unsigned char audio[] = {"
xxd -i <audio.ogg od -An -vtu1 <audio.ogg | awk '{for (i=1; i<=NF; i++) printf "0x%s, ", $i}'
echo "};const uint64_t audio_size = sizeof(audio);" echo "};"
echo "const uint64_t audio_size = sizeof(audio);"
} }
main main