Fix sed for macos in patch script

This commit is contained in:
Shivam Mathur 2025-01-18 02:22:55 +05:30
parent caf188e706
commit 7b76fc1ec5
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -1,7 +1,7 @@
process_file() { process_file() {
local file=$1 local file=$1
sed -i '0,/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\).*/s//\#include <ext\/random\/php_random.h>/' "$file" sed -i'' -e '0,/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\).*/s//\#include <ext\/random\/php_random.h>/' "$file"
sed -i '/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\)/d' "$file" sed -i'' -e '/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\)/d' "$file"
} }
export -f process_file export -f process_file