-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsvnst.sh
executable file
·33 lines (26 loc) · 921 Bytes
/
svnst.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
svnst='svn st | grep -P "^(?!.*\.).|\.sql$|\.h$|\.cpp$|\.xml\.example$|\.sh$|^Makefile$|\.py$|.proto$" | grep -v -P "tmp|touchfile|\bcodedef\b|\.pb\.|installed|tags|_exec$|\.me$|test_.*$|makefile|config_me"'
#| egrep -v ".xml$|.temp$|log/|protobuf-2\.5\.0|\.codedef\.|_exec$|\.d\.|\.d$|\.pb\." | sed "s/^/\t&/g"'
#svnst='svn st | egrep ".h$|.cpp%|.xml.example|.sh|^Makefile$" | egrep -v ".xml$|.temp$|log/|protobuf-2\.5\.0|\.codedef\.|_exec$|\.d\.|\.d$|\.pb\." | sed "s/^/\t&/g"'
filelist=$(eval $svnst)
if [[ -z $filelist ]]; then #是空串
exit 0
fi
echo svn st:
eval $svnst
echo ""
if [[ $# == 0 ]]; then
exit 0
fi
cut_files_column="$svnst | awk '{print \$2}'"
files=$(eval $cut_files_column)
svncmd="svn -m\"$1\" ci $files"
echo ""
echo "do u want commit these files? "
echo ""
echo " "$svncmd
echo ""
read -p "[y/n]?" sure
if [[ $sure == Y || $sure == y ]] ; then
eval $svncmd
fi