summaryrefslogtreecommitdiff
path: root/ext/fileinfo/generate_patch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fileinfo/generate_patch.sh')
-rwxr-xr-xext/fileinfo/generate_patch.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/fileinfo/generate_patch.sh b/ext/fileinfo/generate_patch.sh
index 325a321d74..5431ca5e4f 100755
--- a/ext/fileinfo/generate_patch.sh
+++ b/ext/fileinfo/generate_patch.sh
@@ -4,4 +4,5 @@ if [[ ! -d libmagic.orig ]]; then
wget -O - ftp://ftp.astron.com/pub/file/file-$VERSION.tar.gz \
| tar -xz --strip-components=2 -C libmagic.orig file-$VERSION/src
fi
+sed -e "s/X\.YY/${VERSION//.}/g" libmagic.orig/magic.h.in > libmagic.orig/magic.h
diff -u libmagic.orig libmagic | grep -v '^Only in' > libmagic.patch