LOG=/tmp/ace-install.log # Arguments: Message # Description: logs Message to $LOG log() { echo "$@" >> $LOG } error() { echo "$@" cd - >> "$LOG" 2>&1 exit 1 } cd /tmp/ # Mount the root fs rw log "Mounting the root file system read-write: " echo -n "Mounting the root file system read-write: " mount -o rw,remount / >> "$LOG" 2>&1 || error "Failed to mount / read/write" log "OK" echo "OK" log "Uninstalling all versions of AutoCorrect Edit... " echo "Uninstalling all versions of AutoCorrect Edit... " log "Removing AutoCorrect Edit: " echo -n "Removing AutoCorrect Edit: " ipkg remove com.rickhong.app.autocorrectedit LNG=`cat /var/lib/software/system_settings.info|grep localeLanguage|sed -e "s/^localeLanguage=//"`; CNT=`cat /var/lib/software/system_settings.info|grep localeCountry|sed -e "s/^localeCountry=//"`; cp -f /etc/palm/autoreplace/${LNG}_${CNT}/text-edit-autoreplace.orig /etc/palm/autoreplace/${LNG}_${CNT}/text-edit-autoreplace rm -rf /usr/palm/applications/com.rickhong.app.autocorrectedit/ /var/usr/palm/applications/com.rickhong.app.autocorrectedit/ rm -rf /usr/share/dbus-1/system-services/com.rickhong.ace /usr/lib/luna/java/AceEngine.jar /etc/event.d/com.rickhong.ace log "OK" echo "OK" log "Uninstalling webosinternals services... " echo "Uninstalling webosinternals services... " ipkg remove org.webosinternals.services log "Refreshing app list: " echo -n "Refreshing app list: " /usr/bin/luna-send palm://com.palm.applicationManager/rescan {} || error "Failed to refresh app list on Pre" log "OK" echo "OK" echo "AutoCorrect Edit has been successfully removed from your device..." # Mount the root fs ro log "Remounting the root file system as read-only: " echo -n "Remounting the root file system as read-only: " mount -o ro,remount / >> "$LOG" 2>&1 if [ $? -ne 0 ]; then echo "Please restart your device to complete uninstallation." exit else log "OK" echo "OK" fi cd - >> "$LOG" 2>&1