-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.sh
More file actions
51 lines (43 loc) · 1.32 KB
/
script.sh
File metadata and controls
51 lines (43 loc) · 1.32 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
#!/usr/bin/env bash
#============================================================================================
#
# FileName: script.sh
#
# Descriptions:
#
# Version: 1.0
# Created: 2012-11-22 16:38:12
# Revision: (none)
#
# Author: xutao(mark), butbueatiful@gmail.com
# Company: wanwei-tech
#
#============================================================================================
SRCDIR="/home/zealoussnow/gao/old/shencai_protocols/send_recv/"
SRCDIR2="code/src"
DESDIR="/home/zealoussnow/gao/new/"
cd ${SRCDIR}
for filename in *
do
echo -e "\E[01;31m${filename} start....\E[0m"
rm -rf ${DESDIR}/${filename} # 删除目标文件夹里有的相同目录
cp -r ${DESDIR}/demo ${DESDIR}/${filename} # 将模版目录拷贝一份名字跟为 ${filename}
rm -rf ${DESDIR}/script.sh
cp $SRCDIR/${filename}/$SRCDIR2/* ${DESDIR}/${filename}/src/ # 将源码拷贝到上一步生成的目录的相应位置
sed -i '5c INCLUDES=-I$(top_srcdir)/include' ${DESDIR}/${filename}/src/Makefile.am # 修改Makefile.am
cd ${DESDIR}/${filename}
rm -f config.cache config.log
autoscan
autoscan
rm -f configure.scan
aclocal
autoconf
autoheader
automake -ac --foreign --add-missing --copy
./configure --host=arm-linux
make
make clean
git init
git add .
git commit -m "V1"
done