forked from microsoft/CodeBERT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold-git-proc.sh
executable file
·52 lines (43 loc) · 1.22 KB
/
old-git-proc.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
# Bold High Intensty
BIBlack="\033[1;90m" # Black
BIRed="\033[1;91m" # Red
BIGreen="\033[1;92m" # Green
BIYellow="\033[1;93m" # Yellow
BIBlue="\033[1;94m" # Blue
BIPurple="\033[1;95m" # Purple
BICyan="\033[1;96m" # Cyan
BIWhite="\033[1;97m" # White
# High Intensty backgrounds
On_IBlack="\033[0;100m" # Black
On_IRed="\033[0;101m" # Red
On_IGreen="\033[0;102m" # Green
On_IYellow="\033[0;103m" # Yellow
On_IBlue="\033[0;104m" # Blue
On_IPurple="\033[10;95m" # Purple
On_ICyan="\033[0;106m" # Cyan
On_IWhite="\033[0;107m" # White
BICyan='\033[1;96m'
COLOR_B='\033[1;90m'
BIGreen='\033[1;92m'
COLOR_D='\033[0m' # No Color
COLOR_E='\033[0;31m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo ${RED}'git pull'${NC}
git pull
# echo -e ${ACTION}Checking Git repo. ${COLOR_D}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" != "master" ]; then
echo ${RED}'Need to pull.'${NC}
git pull
elif [[ `git status --porcelain` ]]; then
echo ${RED}'Need to commit and push.'${NC}
now=$(date)
make -f MakefileGit m="Updated at $now"
else
git status
echo ${RED}'Current branch is up to date with origin/master.'${NC}
fi
echo ${RED}'Done.'${NC}
echo
git status