]> git.saurik.com Git - cydia.git/blobdiff - Library/startup
Fix the type of the ellipsis: argument.
[cydia.git] / Library / startup
index b75654f3cc302ca8bb97ecc1962e5b177f216ffe..4d72c330f1fce56144e6826ad9c75233ff877b54 100755 (executable)
@@ -1,6 +1,21 @@
 #!/bin/bash
-sysctl -w security.mac.proc_enforce=0 security.mac.vnode_enforce=0 &>/dev/null
+
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+sbdidlaunch
+
+if [[ ! -e /var/lib/cydia/firmware.ver ]]; then
+    cache=
+fi
+
 /usr/libexec/cydia/firmware.sh
-for deb in /var/mobile/Media/Cydia/AutoInstall/*.deb; do
-    /usr/bin/dpkg -i "${deb}" && /bin/rm "${deb}"
-done
+
+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