#!/bin/sh
set -e

PATH=/var/jb/usr/bin:/var/jb/bin:/usr/bin:/bin

# Register the rootless application with SpringBoard after dpkg/Sileo installs
# it.  The targeted path avoids rebuilding the entire icon cache when the
# jailbreak's uicache supports per-bundle registration; the fallback keeps
# installs working on older rootless uicache builds.
if [ -x /var/jb/usr/bin/uicache ]; then
    /var/jb/usr/bin/uicache -p /var/jb/Applications/Rock.app \
        || /var/jb/usr/bin/uicache -a \
        || true
fi

exit 0
