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 3195001..a304e8d 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 14f4103..f88d8d3 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
 }