aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint
diff options
context:
space:
mode:
Diffstat (limited to 'sbopkglint')
-rwxr-xr-xsbopkglint6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbopkglint b/sbopkglint
index fd458c4..2e86174 100755
--- a/sbopkglint
+++ b/sbopkglint
@@ -584,6 +584,12 @@ find_warnfiles() {
rm -f $output
}
+# return true if the file is gzipped, otherwise false.
+# faster than using file(1).
+is_gzipped() {
+ [ "$( hexdump -n 2 -e '"%2x"' "$1" )" = '8b1f' ]
+}
+
# N.B. these need to match the template (and they do)
TMP=${TMP:-/tmp/SBo}
OUTPUT=${OUTPUT:-/tmp}