cd /home/yun/lede/

echo 'start 3800' >> /home/yun/okimg/mk.log
date >> /home/yun/okimg/mk.log

cat 38.config > .config
./scripts/feeds update -a && ./scripts/feeds install -a && make -j8 download V=s

echo 'downloaded' >> /home/yun/okimg/mk.log
date >> /home/yun/okimg/mk.log

make -j3 V=s

echo 'end make' >> /home/yun/okimg/mk.log
date >> /home/yun/okimg/mk.log

cp /home/yun/lede/bin/targets/ar71xx/generic/openwrt-ar71xx-generic-wndr3800-squashfs-factory.img /home/yun/okimg/op3800.img
cd /home/yun/okimg/
zip op3800.img.zip op3800.img
rm op3800.img
mv op3800.img.zip `date "+%Y-%m-%d-%H-%M"`-3800.img.zip

echo 'end 3800' >> /home/yun/okimg/mk.log
date >> /home/yun/okimg/mk.log
