Skip to content

Commit

Permalink
Merge pull request #6245 from aafbsd/patch-1
Browse files Browse the repository at this point in the history
Support FreeBSD's sed -i
  • Loading branch information
Neilpang authored Feb 28, 2025
2 parents 5236e81 + 661c3bb commit 63d11c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,9 @@ _sed_i() {
if sed -h 2>&1 | grep "\-i\[SUFFIX]" >/dev/null 2>&1; then
_debug "Using sed -i"
sed -i "$options" "$filename"
elif sed -h 2>&1 | grep "\-i extension" >/dev/null 2>&1; then
_debug "Using FreeBSD sed -i"
sed -i "" "$options" "$filename"
else
_debug "No -i support in sed"
text="$(cat "$filename")"
Expand Down

0 comments on commit 63d11c3

Please sign in to comment.