]> git.phdru.name Git - cookiecutter.git/commitdiff
Use sed --in-place instead of replace
authorOleg Broytman <phd@phdru.name>
Sat, 20 May 2017 13:26:47 +0000 (16:26 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 20 May 2017 19:08:04 +0000 (22:08 +0300)
mk-project
rename-project

index 3195001195aacd1cdb3a9bc279bc3f931045eba2..a304e8d5e7c07b1b28448f3a7fc5d1359fd61105 100755 (executable)
@@ -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 &&
 
index 14f41038e5027b99e89149e717709f039af6029c..f88d8d3a80d43fc1531f7a83be5aaacbebbffd3e 100755 (executable)
@@ -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
 }