#!/bin/sh -e
[ -z "$DEBUG" ] || set -x
echo "########## rkscript: target install ##########"
cd /home/ych/rk3568/buildroot
touch /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.stamp_installed
if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.files-list-target.txt ]; then cd /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target; cat /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.files-list-target.txt | xargs md5sum /dev/null > /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.md5 2>/dev/null || true; cd -; fi
cd /home/ych/rk3568/buildroot
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -d /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/init.d/
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/S*usbdevice.sh /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/init.d/
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/S*iodomain.sh /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/init.d/
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/S*async-commit.sh /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/init.d/
cd /home/ych/rk3568/buildroot
/usr/bin/install -D -m 0644 package/rockchip/rkscript//usbdevice.sh /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/profile.d/usbdevice.sh
/bin/sed -i -e "s#\(USB_FUNCS=\).*#\1\"adb\"#" /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/profile.d/usbdevice.sh
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/usbdevice /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/usr/bin/
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -d /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib/udev/rules.d/
/usr/bin/install -m 0644 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/61-usbdevice.rules /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib/udev/rules.d/
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/list-iodomain.sh /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/usr/bin/
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -d /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib/udev/rules.d/
/usr/bin/install -m 0644 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/*.rules /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib/udev/rules.d/
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/async-commit /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/usr/bin/
cd /home/ych/rk3568/buildroot
rm -f -rf  /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/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_recovery/target; find . \( -type f -o -type l \) -cnewer /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.stamp_installed | tee /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.files-list-target.txt | /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/host/bin/tar --no-recursion --ignore-failed-read -cf /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/rkscript.tar -T -; true;
cd /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target; if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.md5 ]; then md5sum -c /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.md5 2>&1 | grep "FAILED$" | cut -d':' -f1 > /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/rkscript/.files-list-target-update.txt; fi
