xref: /PHP-8.1/ext/fileinfo/generate_patch.sh (revision 6ab4286f)
1VERSION=5.40
2if [[ ! -d libmagic.orig ]]; then
3  mkdir libmagic.orig
4  wget -O - ftp://ftp.astron.com/pub/file/file-$VERSION.tar.gz \
5    | tar -xz --strip-components=2 -C libmagic.orig file-$VERSION/src
6fi
7sed -e "s/X\.YY/${VERSION//.}/g" libmagic.orig/magic.h.in > libmagic.orig/magic.h
8diff -u libmagic.orig libmagic | grep -v '^Only in' > libmagic.patch
9