-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_to_github.sh
More file actions
37 lines (25 loc) · 825 Bytes
/
push_to_github.sh
File metadata and controls
37 lines (25 loc) · 825 Bytes
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
#shell
#***********************************************
#
# Filename: copy.sh
#
# Author: royalchen
# Email: royalchen@royalchen.com
# website: www.royalchen.com
# Description: ----
#
# Create: 2017-12-11 16:17:50
# Last Modified: 2017-12-11 16:17:50
#***********************************************
dst_dir=/root/github/GameWorld
cur_dir=`pwd`
#first update code
svn update .
msg=$1
cd ../
rsync -avz --delete --exclude='lobby' --exclude='107_miniGame' --exclude='*.d' --exclude='runnable' --exclude='.svn/' --exclude='.git' --exclude='*.log' --exclude='*.o' --exclude='*.a' --exclude='*.lib' --exclude='*.dll' --exclude='libboost_*' --exclude='Task.txt' --exclude='*.exe' --exclude='dbdata' GameWorld/ $dst_dir
cd $dst_dir
git add *
git commit -a -m "$1"
git push
cd $cur_dir