Closed darthr4v3m closed 2 years ago
It looks like that the version of grep shipped on MacOS doesn't support this options.
grep
MacOS version: 12.6 (21G115) grep shipped version: grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
I find two possible solution.
Use --extended-regexp instead of --perl-regexp. Pros: uses shipped grep. Cons: regex need to be changed.
--extended-regexp
--perl-regexp
Install GNU grep (e.g. with Homebrew). Pros: regex remains the same. Cons: installation of new command.
https://github.com/NicolasWebDev/reinstall-magisk-on-lineageos/blob/315e837cb7a92c2fa57938940328cb7dcb4980f1/reinstall-magisk-on-lineageos#L32
Fixed in commit 1d77e3ac69e79b36a7232573c1523a4ee9953dab.
Thank you for making the script more portable.
It looks like that the version of
grep
shipped on MacOS doesn't support this options.MacOS version: 12.6 (21G115) grep shipped version: grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
I find two possible solution.
Use
--extended-regexp
instead of--perl-regexp
. Pros: uses shipped grep. Cons: regex need to be changed.Install GNU grep (e.g. with Homebrew). Pros: regex remains the same. Cons: installation of new command.
https://github.com/NicolasWebDev/reinstall-magisk-on-lineageos/blob/315e837cb7a92c2fa57938940328cb7dcb4980f1/reinstall-magisk-on-lineageos#L32