-
Notifications
You must be signed in to change notification settings - Fork 2
/
make-tnetd7300
executable file
·58 lines (48 loc) · 978 Bytes
/
make-tnetd7300
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
#!/bin/sh
INSTALL_DIR=../public_html/
cd /home/flyrouter/flyrouter
mkdir -p -v ~/FlyRouterBIN/download
rm -rf ./dl
ln -s ~/FlyRouterBIN/download dl
clean_root(){
make clean_root
}
clean_linux(){
rm -rf build_mipsel/linux*
}
clean_build(){
rm -rf build_mipsel
}
install(){
mkdir -p $INSTALL_DIR
cp -a bin $INSTALL_DIR
rm -f bin/openwrt*
}
build(){
local ver=$1
local config=$2
clean_linux
temp=`tempfile -p linux -s -config`
if [ -r target/linux/ar7-$ver/config-$config ]; then
cp target/linux/ar7-$ver/config $temp
cp target/linux/ar7-$ver/config-$config target/linux/ar7-$ver/config
fi
cp target/linux/ar7-$ver/openwrt-config-$config .config
make oldconfig DEVELOPER=1
make --jobs=4 V=99
#make --jobs=4
#make
ret=$?
if [ "$ret" = 0 ]; then
rename "s/.bin/-$config.bin/" bin/*
install
fi
if [ -s $temp ]; then
cp $temp target/linux/ar7-$ver/config
fi
rm $temp
[ "$ret" != 0 ] && exit 1
}
clean_build
clean_root
build 2.4 midge-tnetd