Skip to content

Commit

Permalink
chore: use more portable grep
Browse files Browse the repository at this point in the history
replace newer quiet `grep` with more portable syntax for vintage `grep`
implementations:
`grep -q foo` → `grep foo >/dev/null 2>&1`

Signed-off-by: Lucas Larson <[email protected]>
  • Loading branch information
LucasLarson committed May 11, 2024
1 parent 75213f6 commit cc7f9d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ command -p -- find -- . \
# if zsh is available, then replace bash, ash, and sh with zsh in `/etc/passwd`
command -p -- test -w '/etc/passwd' &&
command -v -- zsh >/dev/null 2>&1 &&
command -p -- grep -E -e '/bin/b?a?sh' '/etc/passwd' 2>&1 &&
command -p -- grep -E -e '/bin/b?a?sh' '/etc/passwd' >/dev/null 2>&1 &&
command -p -- cp -- '/etc/passwd' '/etc/passwd-'"${now-}" &&
command -p -- sed -e 's|/bin/b\{0,1\}a\{0,1\}sh$|'"$(command -v -- zsh)"'|' '/etc/passwd-'"${now-}" >'/etc/passwd'

Expand Down

0 comments on commit cc7f9d5

Please sign in to comment.