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
2014-11-27 12:45:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8766ab5de2a6b6754aa069aa364ea5386bcb1bd2
8766ab5d
1 parent
e76c53da
add git2unix script
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
22 行增加
和
0 行删除
trunk/scripts/git.commit.sh
trunk/scripts/git2unix.sh
trunk/scripts/git.commit.sh
查看文件 @
8766ab5
#!/bin/bash
# sudo ln -sf `pwd`/git.commit.sh /bin/git-ensure-commit
echo
"submit code to github.com"
echo
"argv[0]=
$0
"
...
...
trunk/scripts/git2unix.sh
0 → 100755
查看文件 @
8766ab5
#!/bin/bash
# sudo ln -sf `pwd`/git2unix.sh /bin/git2unix
dos2unix -V>/dev/null 2>&1
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"dos2unix not found."
echo
" sudo yum install -y dos2unix"
exit
$ret
fi
files
=
`
git status|egrep
"(modified|new file)"
|awk -F
':'
'{print $2}'
|awk
'{print $1}'
|egrep
"(.hpp
$|
.cpp
$|
.cc
$|
.h
$|
.c
$|
.txt
$|
.sh
$)
"
`
;
for
file
in
$files
;
do
dos2unix
$file
;
echo
$file
|grep
".sh$"
>/dev/null 2>&1;
EOF_SH
=
$?
if
[[
$EOF_SH
-ne 0
&&
-f
$file
]]
;
then
echo
"chmod -x
$file
"
chmod -x
$file
;
fi
done
...
...
请
注册
或
登录
后发表评论