Files
RedBear-OS/recipes/libs/cairo/source/test/check-pdf-structure.sh
vasilito facf0c92e0 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

22 lines
594 B
Bash
Executable File

#!/bin/sh
if test $# -ne 4 ; then
echo "Usage: $0 <pdf-file> <pdfinfo-output> <pdfinfo-ref> <diff-output>"
exit 3
fi
# Check for pdfinfo version >= 21.10.00
if pdfinfo -v 2>& 1 | awk '/pdfinfo version/ { split($3,v,/[.]/); if (v[1] > 21 || (v[1] == 21 && v[2] >= 10) ) { print "yes" } } ' | grep -q 'yes'; then
pdfinfo -struct-text "$1" > "$2"
if test -f "$3" ; then
diff -u "$3" "$2" > "$4"
# diff exit codes: 0 = match, 1 = different, 2 = error
exit $?
else
exit 3 # missing ref file
fi
fi
# pdfinfo missing or wrong version
exit 4