Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-09-21 18:32:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
faf6d158782ee331572e648759436ee3f2310f26
faf6d158
1 parent
1de2bb08
add replace script.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
26 行增加
和
0 行删除
trunk/scripts/sources_replace.sh
trunk/scripts/sources_replace.sh
0 → 100755
查看文件 @
faf6d15
#!/bin/bash
from
=
$1
to
=
$2
if
[[
$from
==
''
]]
;
then
echo
"replace from must not be empty"
exit
1
fi
if
[[
$to
==
''
]]
;
then
echo
"replace to must not be empty"
exit
1
fi
echo
"from=
$from
"
echo
"to=
$to
"
files
=
"configure
`
ls auto
`
`
ls conf
`
`
ls scripts
`
`
find etc -type f
`
`
find ide -type f
`
`
find research -type f
`
`
find src -type f
`
"
for
file
in
$files
;
do
grep -in
"
$from
"
$file
>/dev/null 2>&1;
if
[[
0 -eq
$?
]]
;
then
echo
"replace
$file
"
;
#sed -i '' "s|$from|$to|g" $file;
fi
;
done
...
...
请
注册
或
登录
后发表评论