#!/bin/sh -e
[ -z "$DEBUG" ] || set -x
echo "########## ifupdown-scripts: target install ##########"
cd /home/ych/rk3568/buildroot
touch /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.stamp_installed
if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.files-list-target.txt ]; then cd /home/ych/rk3568/buildroot/output/rockchip_rk3568/target; cat /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.files-list-target.txt | xargs md5sum /dev/null > /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.md5 2>/dev/null || true; cd -; fi
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -D package/ifupdown-scripts//nfs_check /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/network/nfs_check
rsync -a --ignore-times --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' package/ifupdown-scripts//network/ /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/network/
cd /home/ych/rk3568/buildroot
/usr/bin/install -D -m 0755 package/ifupdown-scripts//S40network /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/init.d/S40network
echo "# interface file auto-generated by buildroot" > /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/network/interfaces
( echo ; echo "auto lo"; echo "iface lo inet loopback"; ) >> /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/network/interfaces
cd /home/ych/rk3568/buildroot
rm -f -rf  /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/share/info/dir
cd /home/ych/rk3568/buildroot
if test -n "" ; then rm -f -f  ; fi
cd /home/ych/rk3568/buildroot/output/rockchip_rk3568/target; find . \( -type f -o -type l \) -cnewer /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.stamp_installed | tee /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.files-list-target.txt | /home/ych/rk3568/buildroot/output/rockchip_rk3568/host/bin/tar --no-recursion --ignore-failed-read -cf /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/ifupdown-scripts.tar -T -; true;
cd /home/ych/rk3568/buildroot/output/rockchip_rk3568/target; if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.md5 ]; then md5sum -c /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.md5 2>&1 | grep "FAILED$" | cut -d':' -f1 > /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/ifupdown-scripts/.files-list-target-update.txt; fi
