Specify path to sed on MacOS and FreeBSD (#961)

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
This commit is contained in:
Gary Miguel 2023-05-10 12:37:44 -07:00 committed by GitHub
parent 7fa1a1259b
commit 12ecb0419a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ if [ -d "$1" ]; then
for file in ${files[@]+"${files[@]}"}; do for file in ${files[@]+"${files[@]}"}; do
local backup=$(mktemp) local backup=$(mktemp)
touch -r "${file}" "${backup}" touch -r "${file}" "${backup}"
sed -i '' -e 's@'"$2"'@'"$3"'@g' "${file}" /usr/bin/sed -i '' -e 's@'"$2"'@'"$3"'@g' "${file}"
if [[ "$?" -ne "0" ]]; then if [[ "$?" -ne "0" ]]; then
exit 1 exit 1
fi fi

View File

@ -74,7 +74,7 @@ if [ -d "$1" ]; then
for file in ${files[@]+"${files[@]}"}; do for file in ${files[@]+"${files[@]}"}; do
local backup=$(mktemp) local backup=$(mktemp)
touch -r "${file}" "${backup}" touch -r "${file}" "${backup}"
sed -i '' -e 's@'"$2"'@'"$3"'@g' "${file}" /usr/bin/sed -i '' -e 's@'"$2"'@'"$3"'@g' "${file}"
if [[ "$?" -ne "0" ]]; then if [[ "$?" -ne "0" ]]; then
exit 1 exit 1
fi fi