1*cdf0e10cSrcweir#!/bin/sh 2*cdf0e10cSrcweir 3*cdf0e10cSrcweir# check whether /usr is writable 4*cdf0e10cSrcweirtiptoe="${PKG_INSTALL_ROOT}/usr/_.$$" 5*cdf0e10cSrcweirtouch "$tiptoe" >/dev/null 2>&1 6*cdf0e10cSrcweirif [ $? -ne 0 ]; then 7*cdf0e10cSrcweir exit 0 8*cdf0e10cSrcweirfi 9*cdf0e10cSrcweirrm -f "$tiptoe" 10*cdf0e10cSrcweir 11*cdf0e10cSrcweir# update shared mime database 12*cdf0e10cSrcweirif [ -x /usr/bin/update-mime-database ]; then 13*cdf0e10cSrcweir update-mime-database ${PKG_INSTALL_ROOT}/usr/share/mime 14*cdf0e10cSrcweirfi 15*cdf0e10cSrcweir 16*cdf0e10cSrcweirif [ -x /usr/bin/update-desktop-database ]; then 17*cdf0e10cSrcweir /usr/bin/update-desktop-database -q 18*cdf0e10cSrcweirelif (which update-desktop-database); then 19*cdf0e10cSrcweir update-desktop-database -q /usr/share/applications 20*cdf0e10cSrcweirfi 21*cdf0e10cSrcweir 22*cdf0e10cSrcweir 23*cdf0e10cSrcweirexit 0 24