diff options
author | Sam Bingner <sam@bingner.com> | 2018-10-15 15:00:44 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-05-27 14:27:40 -1000 |
commit | 59aa7ad8769041d89f7c635e887224d40503fa2b (patch) | |
tree | 8a1d2551a97b612f511668ae642e87eebd440f20 /Sources.mm | |
parent | 2dc87015cb656153fdf7d492b091424636b32d84 (diff) |
Refuse to load electra repos
Diffstat (limited to 'Sources.mm')
-rw-r--r-- | Sources.mm | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -58,6 +58,10 @@ void CydiaWriteSources() { if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"]) continue; + // Don't add Electra sources + if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound) + continue; + NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]); fprintf(file, "%s %s %s%s%s\n", @@ -73,6 +77,14 @@ void CydiaWriteSources() { } void CydiaAddSource(NSDictionary *source) { + // 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"]) + return; + + // Don't add Electra sources + if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound) + return; + [Sources_ setObject:source forKey:[NSString stringWithFormat:@"%@:%@:%@", [source objectForKey:@"Type"], [source objectForKey:@"URI"], [source objectForKey:@"Distribution"]]]; } |