Skip to content

Commit

Permalink
Fix sed for macos in patch script
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jan 17, 2025
1 parent b26b83b commit ba8c721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/extensions/patches/common.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process_file() {
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 '/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\)/d' "$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'' -e '/#include.*\(php_lcg.h\|php_mt_rand.h\|php_rand.h\|standard\/php_random\.h\)/d' "$file"
}

export -f process_file
Expand Down

0 comments on commit ba8c721

Please sign in to comment.