Specify path to sed on MacOS and FreeBSD (#961)
Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
This commit is contained in:
parent
7fa1a1259b
commit
12ecb0419a
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue