X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/6c0691af14a7ae3c86339dd0cb95beca980d93d4..e79e7ac00536e40bddc8d4541ef72059ac349e9a:/Sources.mm diff --git a/Sources.mm b/Sources.mm index 372aa1ee..a156ee2f 100644 --- a/Sources.mm +++ b/Sources.mm @@ -19,16 +19,16 @@ **/ /* }}} */ +#include "CyteKit/UCPlatform.h" + #include #include -#include #include #include "Sources.h" extern _H Sources_; -extern bool Changed_; void CydiaWriteSources() { unlink(SOURCES_LIST); @@ -38,6 +38,9 @@ void CydiaWriteSources() { fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber); for (NSString *key in [Sources_ allKeys]) { + if ([key hasPrefix:@"deb:http:"] && [Sources_ objectForKey:[NSString stringWithFormat:@"deb:https:%s", [key UTF8String] + 9]]) + continue; + NSDictionary *source([Sources_ objectForKey:key]); NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]); @@ -56,7 +59,6 @@ void CydiaWriteSources() { void CydiaAddSource(NSDictionary *source) { [Sources_ setObject:source forKey:[NSString stringWithFormat:@"%@:%@:%@", [source objectForKey:@"Type"], [source objectForKey:@"URI"], [source objectForKey:@"Distribution"]]]; - Changed_ = true; } void CydiaAddSource(NSString *href, NSString *distribution, NSArray *sections) {