summaryrefslogtreecommitdiff
path: root/Sources.mm
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-09-30 22:50:49 -1000
committerSam Bingner <sam@bingner.com>2018-09-30 22:50:49 -1000
commitae2e967c43880fbd1b7e7f130541e9dbbca0debf (patch)
tree09441918f5ad09a47a750885187e44493a5e8b12 /Sources.mm
parente1fe198695e4c91f62772fb1dbbfdc4607503cdc (diff)
Make Cydia compatible back to iOS5 - unable to support older with this apt version due to newer apt requiring functions provided via libc++ on iOS
Diffstat (limited to 'Sources.mm')
-rw-r--r--Sources.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Sources.mm b/Sources.mm
index 0e48168..9957123 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -35,13 +35,21 @@ void CydiaWriteSources() {
FILE *file(fopen(SOURCES_LIST, "w"));
_assert(file != NULL);
- fprintf(file, "deb http://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ if (kCFCoreFoundationVersionNumber >= 1443) {
+ fprintf(file, "deb https://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ } else {
+ fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ fprintf(file, "deb https://apt.bingner.com/ ./\n");
+ }
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]);
+ // Ignore it if main source is added again
+ if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"])
+ continue;
NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]);