forked from theasp/openwrt-builder-wndr-4300
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·39 lines (26 loc) · 781 Bytes
/
build.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
#!/bin/bash
set -ex
export http_proxy=http://localhost:3128
SCRIPT=$(readlink -f "$0")
TOPDIR=$(dirname "$SCRIPT")
BINDIR=bin/ar71xx/
URL="https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/OpenWrt-ImageBuilder-15.05-ar71xx-nand.Linux-x86_64.tar.bz2"
FILE=$(basename $URL)
DIR=${FILE%.tar.bz2}
PROFILE=WNDR4300
PACKAGES="wget luci luci-theme-bootstrap iptables-mod-nat-extra ipset libopenssl shadowsocks-libev -dnsmasq dnsmasq-full pdnsd luci-app-upnp bind-dig"
if [ ! -e $FILE ]; then
wget $URL
fi
rm -rf build
mkdir -p build
cd build
tar xvfj $TOPDIR/$FILE
cd $DIR
for patch in $TOPDIR/patches/*.patch; do
patch -p1 < $patch
done
make image PROFILE="$PROFILE" PACKAGES="$(echo $PACKAGES)"
cp $BINDIR/*.{tar,img} $TOPDIR
cd $TOPDIR
#rm -r build