X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/30d83bfe3de9b01355cfb1500ed5c24c3039e03f..a46e58cde6233750ddb7ab26b19b8727122f17f9:/Library/startup diff --git a/Library/startup b/Library/startup index b75654f3..a51843b8 100755 --- a/Library/startup +++ b/Library/startup @@ -1,6 +1,20 @@ #!/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 + +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