#!/bin/bash
# iOS 6
[ -d /System/Library/PrivateFrameworks/IMDPersistence.framework ] && exec /Applications/HandcentSMS.app/HandcentSMSfw6 -replace-launcher

# iOS 5
if [ -d /System/Library/PrivateFrameworks/BulletinBoard.framework ] 
then
    mv /Applications/HandcentSMS.app/Infofw5.plist /Applications/HandcentSMS.app/Info.plist
    exec /Applications/HandcentSMS.app/HandcentSMSfw5 -replace-launcher
fi

# iOS 4
if [ -d /System/Library/Frameworks/CoreTelephony.framework ] 
then
    mv /Applications/HandcentSMS.app/Infofw4.plist /Applications/HandcentSMS.app/Info.plist
    exec /Applications/HandcentSMS.app/HandcentSMSfw4 -replace-launcher
fi

# iOS 3
mv /Applications/HandcentSMS.app/Infofw3.plist /Applications/HandcentSMS.app/Info.plist
exec /Applications/HandcentSMS.app/HandcentSMSfw3 -replace-launcher
