set -e

if [ -e /var/mobile ]; then
    :
else
echo "没有越狱成功! 请重新越狱."
exit
fi

if [ "$1" = "Tips" ]; then
app=$(find /var/containers/Bundle/Application/ -name "Tips.app")
mv ${app}/Tips ${app}/Tips_TROLLSTORE_BACKUP
cp /var/mobile/Media/PersistenceHelper ${app}/Tips
cp /var/mobile/Media/trollstorehelper $app
chown 33 ${app}/Tips
chmod 755 ${app}/Tips ${app}/trollstorehelper
chown 0 ${app}/trollstorehelper
echo "" >${app}/.TrollStorePersistenceHelper
echo "完成！重启设备   ----玄烨品果"
exit
fi
