comparison mupdf-source/scripts/hexdump.sh @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #!/bin/bash
2
3 FILE=$1
4 if [ ! -f "$FILE" ]
5 then
6 echo usage: bash scripts/hexdump.sh input.ttf
7 exit 1
8 fi
9
10 NAME=$(basename "$FILE" | sed 's/[.-]/_/g')
11
12 echo "// This is an automatically generated file. Do not edit."
13 echo "const unsigned char _binary_$NAME[] ="
14 od -v -An -tx1 "$FILE" | sed 's/ *//g;s/[0-9a-f][0-9a-f]/\\x&/g;s/.*/"&"/'
15 echo ";"
16 echo "const unsigned int _binary_${NAME}_size = sizeof(_binary_${NAME}) - 1;"