-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.sh
executable file
·96 lines (76 loc) · 2.04 KB
/
update.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
source Shells/common.sh
source Shells/echo_color.sh
source Shells/git_action.sh
export LANG="zh_CN.GB2312"
testLogColor(){
send=$(datetime)
echo $send
echo_red "red $send"
echo_green "green $send"
echo_yellow "yellow $send"
echo_blue "blue $send"
echo_purple "purple $send"
echo_cyan "cyan $send"
echo_white "white $send"
# echo_redbg "red $send"
# echo_greenbg "green $send"
# echo_yellowbg "yellow $send"
# echo_bluebg "blue $send"
# echo_purplebg "purple $send"
# echo_cyanbg "cyan $send"
# echo_whitebg "white $send"
log "${send}"
log debug "${send}"
log info "${send}"
log warn "${send}"
log error "${send}"
# echo "___$?___"
# echo_purple `$now()`
tmp=$(datetime)
tmpNew=`datetime`
echo "___$(datetime)___"
echo "___${tmp}___"
echo "___${tmpNew}___"
echo "___$(datetimeStamp)___"
exit 1;
}
#------------------------------------------------------------------------
#配置项目名称和路径等相关参数
#------------------------------------------------------------------------
# find -name BNCategory.podspec
#遍历文件目录
# path=$1
# files=$(ls $path)
# for filename in $files
# do
# # echo $filename >> filename.txt
# # echo "filename——${filename}"
# result=$(echo ${filename} | grep ".podspec")
# if [[ "$result" != "" ]]
# then
# echo "包含___${filename}"
# var=$(cat ${filename})
# # echo "文件内容___${var}"
# # echo ${var%s.summary*}
# # gitFuntion ${filename};
# else
# echo "不包含_${filename}"
# fi
# done
filepath=$(cd "$(dirname "$0")"; pwd)
echo_blue "文件目录: ${filepath}"
fileName=${filepath##*/}
#echo "fileName_${fileName}"
fileNameAll="${fileName}.podspec"
echo_blue "查找文件: ${fileNameAll}"
#result=$(echo ${fileNameAll} | grep ".podspec")
#if [[ "$result" != "" ]]
if [ -f "$fileNameAll" ]
then
echo_green "--- $(datetime) ---"
# testLogColor;
updatePod ${fileNameAll};
else
echo_red "文件不存在:$fileNameAll"
fi