5 #include <sys/sysctl.h>
7 #include <Menes/ObjectHandle.h>
9 _H<NSMutableDictionary> Sources_;
14 int main(int argc, const char *argv[]) {
15 if (argc < 2 || strcmp(argv[1], "configure") != 0)
18 NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]);
21 sysctlbyname("kern.osversion", NULL, &size, NULL, 0);
22 char *osversion = new char[size];
23 if (sysctlbyname("kern.osversion", osversion, &size, NULL, 0) != -1)
24 System_ = [NSString stringWithUTF8String:osversion];
26 NSDictionary *metadata([[[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/metadata.plist"] autorelease]);
27 NSUInteger version(0);
29 if (metadata != nil) {
30 Sources_ = [metadata objectForKey:@"Sources"];
32 if (NSNumber *number = [metadata objectForKey:@"Version"])
33 version = [number unsignedIntValue];
37 Sources_ = [NSMutableDictionary dictionaryWithCapacity:8];
40 CydiaAddSource(@"http://apt.thebigboss.org/repofiles/cydia/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
41 CydiaAddSource(@"http://apt.modmyi.com/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
42 CydiaAddSource(@"http://cydia.zodttd.com/repo/cydia/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
43 CydiaAddSource(@"http://repo666.ultrasn0w.com/", @"./");