From: Oleg Broytman Date: Sat, 20 May 2017 13:26:47 +0000 (+0300) Subject: Use sed --in-place instead of replace X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=bc00a09168b883b6a6595b997dac3a170f48567d;p=cookiecutter.git Use sed --in-place instead of replace --- diff --git a/mk-project b/mk-project index 3195001..a304e8d 100755 --- a/mk-project +++ b/mk-project @@ -14,7 +14,7 @@ cp -ap project_template "$HOME/tmp/$project_name" && cd "$HOME/tmp/$project_name" && mv project "$project_name" && -replace '{project}' "$project_name" .gitignore README.rst \ +sed -i /'{project}'/"$project_name"/g .gitignore README.rst \ devscripts/README.html docs/genapidocs docs/install.rst \ mk-distr publish-docs setup.py tox.ini && diff --git a/rename-project b/rename-project index 14f4103..f88d8d3 100755 --- a/rename-project +++ b/rename-project @@ -18,7 +18,7 @@ fix_path() { fix_files() { for file in "$@"; do if [ -f "$file" ]; then - replace "$old_name" "$new_name" "$file" + sed -i /"$old_name"/"$new_name"/g "$file" fi done }