]> git.saurik.com Git - cydia.git/blobdiff - Library/startup
Cydia no longer needs its own Substrate Safe Mode.
[cydia.git] / Library / startup
index 7ee6cd3e54f022fd58793c37a9536a043ebe2a15..7028052893db1b396d8fb37dbf5db537ca634cf7 100755 (executable)
@@ -1,6 +1,23 @@
 #!/bin/bash
+
 export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
+if [[ ! -e /var/lib/cydia/firmware.ver ]]; then
+    cache=
+fi
+
 /usr/libexec/cydia/firmware.sh
-debs=/var/root/Media/Cydia/AutoInstall/*.deb
-dpkg -i ${debs}
-rm -f ${debs}
+
+debs=(/var/root/Media/Cydia/AutoInstall/*.deb)
+if [[ ${#debs[@]} -ne 0 && -f ${debs[0]} ]]; then
+    dpkg -i "${debs[@]}" 2>/tmp/dpkg.log 1>&2
+    rm -f "${debs[@]}"
+    cache=
+
+    killall -9 Lowtide AppleTV
+fi
+
+if [[ ${cache+@} ]]; then
+    sbdidlaunch
+    su -c uicache mobile
+fi