#!/bin/sh -e
[ -z "$DEBUG" ] || set -x
echo "########## usbmount-0.0.22: target install ##########"
cd /home/ych/rk3568/buildroot
touch /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.stamp_installed
if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.files-list-target.txt ]; then cd /home/ych/rk3568/buildroot/output/rockchip_rk3568/target; cat /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.files-list-target.txt | xargs md5sum /dev/null > /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.md5 2>/dev/null || true; cd -; fi
cd /home/ych/rk3568/buildroot
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/usbmount /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/usr/share/usbmount/usbmount
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/00_create_model_symlink /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/usbmount/mount.d/00_create_model_symlink
/usr/bin/install -m 0755 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/00_remove_model_symlink /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/usbmount/umount.d/00_remove_model_symlink
/usr/bin/install -m 0644 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/usbmount.rules /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/lib/udev/rules.d/usbmount.rules
/usr/bin/install -m 0644 -D /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/usbmount.conf /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/usbmount/usbmount.conf
for type in storage udisk sdcard; do mkdir -p /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/media/${type}1 /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/media/${type}2 /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/media/${type}3; mkdir -p /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/mnt/$type; rm -rf /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/media/${type}0; ln -sf /mnt/$type /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/media/${type}0; done
cd /home/ych/rk3568/buildroot
cd /home/ych/rk3568/buildroot
/bin/sed -i -e 's/^\(MOUNTOPTIONS="\)\<sync,*\(.*"\)/\1\2 #"sync,\2/' /home/ych/rk3568/buildroot/output/rockchip_rk3568/target/etc/usbmount/usbmount.conf
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/usbmount-0.0.22/.stamp_installed | tee /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.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/usbmount-0.0.22/usbmount-0.0.22.tar -T -; true;
cd /home/ych/rk3568/buildroot/output/rockchip_rk3568/target; if [ -r /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.md5 ]; then md5sum -c /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.md5 2>&1 | grep "FAILED$" | cut -d':' -f1 > /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/usbmount-0.0.22/.files-list-target-update.txt; fi
