Browse Source
Merge pull request #6245 from aafbsd/patch-1
Support FreeBSD's sed -i
pull/3490/merge
neil
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
0 deletions
-
acme.sh
|
|
@ -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")" |
|
|
|