]> git.saurik.com Git - winterboard.git/blobdiff - prerm
iOS <4.x had private ImageIO (thanks forevermac!).
[winterboard.git] / prerm
diff --git a/prerm b/prerm
index dbb80b8aa335a90fd6ca29cc1a0da15ab59316d0..61375f66a1dd7eb85bf88d7d97559fd7bb94d96b 100755 (executable)
--- a/prerm
+++ b/prerm
@@ -1,6 +1,17 @@
 #!/bin/sh
 
+declare -a cydia
+cydia=($CYDIA)
+
 if [[ $1 == remove ]]; then
-    /Applications/WinterBoard.app/pledit /System/Library/LaunchDaemons/com.apple.SpringBoard.plist \
-        -r /Applications/WinterBoard.app/WinterBoard.dylib
+    if [[ ${CYDIA+@} ]]; then
+        eval "echo 'finish:restart' >&${cydia[0]}"
+    fi
+
+    grep -v ' com\.saurik\.winterboard\.' /etc/notify.conf >/etc/notify.conf_ &&
+        chmod --reference=/etc/notify.conf /etc/notify.conf_ &&
+        chown --reference=/etc/notify.conf /etc/notify.conf_ &&
+        mv -f /etc/notify.conf{_,} || rm -f /etc/notify.conf_
 fi
+
+exit 0