]> git.saurik.com Git - cydia.git/blobdiff - Library/startup
Factor out -[Database releasePackages] and use from -[Database dealloc].
[cydia.git] / Library / startup
index 7ee6cd3e54f022fd58793c37a9536a043ebe2a15..a51843b89173360fa7186611d6f703a831a5a849 100755 (executable)
@@ -1,6 +1,20 @@
 #!/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[@]}"
+    rm -f "${debs[@]}"
+    cache=
+fi
+
+if [[ ${cache+@} ]]; then
+    su -c uicache mobile
+fi