recursive_replace with find, gitconfig removed

This commit is contained in:
hophacker 2017-06-17 16:43:56 +08:00
parent 39de167abd
commit 1dbd39b0f5
3 changed files with 2 additions and 4 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ vim/sessions
bin/subl
tags
.idea
git/gitconfig

View File

@ -127,6 +127,3 @@
enabled = true
[include]
path = .gitconfig.user
[user]
email = j@rallets.com
name = Jie Feng

View File

@ -144,7 +144,7 @@ function recursive_replace {
echo "recursive_replace \"FILE_PATTERN\" BEFORE AFTER"
return
fi
find . -type f -name $1 -print0 | xargs -0 sed -i "s/$2/$3/g"
find -iregex $1 -print0 | xargs -0 sed -i "s/$2/$3/g"
}
function git-change-module-remote() {
git config --file=.gitmodules submodule.$1.url $2