-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_command.sh
More file actions
executable file
·84 lines (65 loc) · 1.55 KB
/
git_command.sh
File metadata and controls
executable file
·84 lines (65 loc) · 1.55 KB
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
#!/bin/sh
# crontab -e
#0 8-22 * * 1-5 sh /home/ppdha82/Project/LinuxProgram/git_command.sh >> /home/ppdha82/Downloads/git/log.txt
#0 23 * * 1-5 sh /home/ppdha82/Project/LinuxProgram/log_clean.sh >> /dev/null
LOG_PATH=/home/ppdha82/Downloads/git
PROJECT_PATH=/home/ppdha82/Project
GIT_PULL=('git pull origin master')
GIT_PULL_ATM=('git pull origin sdk-v1.0.4.0')
LOG_FILE=${LOG_PATH}/log.txt
DIR_001=001_ipm-hi
DIR_002=002_ipm-hi
DIR_003=003_ipm-hi
DIR_004=004_ipm-hi
DIR_005=005_ipm-hi
DIR_006=006_ipm-hi
DIR_007=007_ipm-hi
DIR_008=008_ipm-hi
DIR_009=009_ipm-hi
DIR_010=010_ipm-hi
DIR_011=011_ipm-hi
DIR_012=012_ipm-hi
DIR_013=013_ipm-hi
DIR_014=014_ipm-hi
DIR_015=015_ipm-hi
DATE_LOG=`date`"\n"
function git_pull() {
echo ${PWD} >> ${LOG_FILE}
${GIT_PULL} >> ${LOG_FILE}
echo -e ${DATE_LOG} >> ${LOG_FILE}
}
function git_pull_atm() {
echo ${PWD} >> ${LOG_FILE}
${GIT_PULL_ATM} >> ${LOG_FILE}
echo -e ${DATE_LOG} >> ${LOG_FILE}
}
cd ${PROJECT_PATH}/${DIR_001}
echo -e ${DATE_LOG} >> ${LOG_FILE}
cd ${PROJECT_PATH}/${DIR_002}
git_pull
cd ${PROJECT_PATH}/${DIR_003}
git_pull
cd ${PROJECT_PATH}/${DIR_004}
git_pull
cd ${PROJECT_PATH}/${DIR_005}
git_pull
cd ${PROJECT_PATH}/${DIR_006}
git_pull
cd ${PROJECT_PATH}/${DIR_007}
git_pull
cd ${PROJECT_PATH}/${DIR_008}
git_pull
cd ${PROJECT_PATH}/${DIR_009}
git_pull
cd ${PROJECT_PATH}/${DIR_010}
git_pull
cd ${PROJECT_PATH}/${DIR_011}
git_pull
cd ${PROJECT_PATH}/${DIR_012}
git_pull
cd ${PROJECT_PATH}/${DIR_013}
git_pull
cd ${PROJECT_PATH}/${DIR_014}
git_pull
cd ${PROJECT_PATH}/${DIR_015}
git_pull