#!/bin/sh -e
[ -z "$DEBUG" ] || set -x
echo "########## skeleton-init-common: target install ##########"
cd /home/ych/rk3568/buildroot
touch /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.stamp_installed
if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.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/skeleton-init-common/.files-list-target.txt | xargs md5sum /dev/null > /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.md5 2>/dev/null || true; cd -; fi
cd /home/ych/rk3568/buildroot
rsync -a --ignore-times --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' system/skeleton/ /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/
ln -snf usr/bin /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/bin
ln -snf usr/sbin /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/sbin
ln -snf usr/lib /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib
ln -snf lib /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/lib64
ln -snf lib /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/usr/lib64
/bin/sed -i -e 's,@PATH@,"/usr/bin:/usr/sbin",' /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/etc/profile
/usr/bin/install -m 0644 support/misc/target-dir-warning.txt /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
cd /home/ych/rk3568/buildroot
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/skeleton-init-common/.stamp_installed | tee /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.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/skeleton-init-common/skeleton-init-common.tar -T -; true;
cd /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/target; if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.md5 ]; then md5sum -c /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.md5 2>&1 | grep "FAILED$" | cut -d':' -f1 > /home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/build/skeleton-init-common/.files-list-target-update.txt; fi
