xref: /PHP-7.4/ext/fileinfo/generate_patch.sh (revision f15ab32a)
1VERSION=5.37
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