aboutsummaryrefslogtreecommitdiff
path: root/crc32
diff options
context:
space:
mode:
Diffstat (limited to 'crc32')
-rwxr-xr-xcrc329
1 files changed, 9 insertions, 0 deletions
diff --git a/crc32 b/crc32
new file mode 100755
index 0000000..1adfa3b
--- /dev/null
+++ b/crc32
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Horribly inefficient way to calculate crc32 of a file.
+
+Z=/tmp/crc32hack.$$.$RANDOM.zip
+rm -f $Z
+zip -q $Z "$1"
+zipinfo -v $Z | grep CRC | sed 's,.* ,,'
+rm -f $Z