Skip to content

Commit

Permalink
portable sed
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Aug 27, 2024
1 parent 7fc76f0 commit 648f75d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/apply_diff_and_rename.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ else
fi

# TODO: improve this command that finds all the "coreth" references and replaces them with "subnet-evm"
LANG=C find . -type f \! -name 'apply_diff_and_rename.sh' \! -path './.git/*' \! -path './contracts/node_modules/*' -exec sed -i '' -e "${sed_command}" {} \;
sed_inplace=(sed -i) # Linux
if [[ $(uname) == "Darwin" ]]; then
sed_inplace=(sed -i '')
fi
LANG=C find . -type f \! -name 'apply_diff_and_rename.sh' \! -path './.git/*' \! -path './contracts/node_modules/*' -exec "${sed_inplace[@]}" -e "${sed_command}" {} \;
gofmt -w .
go mod tidy

Expand Down

0 comments on commit 648f75d

Please sign in to comment.