|
@@ -16,7 +16,7 @@
|
|
|
#import <sys/utsname.h>
|
|
|
#import "HelperClass.h"
|
|
|
|
|
|
-#define OPTION_FLAGS "o:i:ld:hcrbp:su:yn:"
|
|
|
+#define OPTION_FLAGS "o:i:ld:hcrbp:su:yn:a:"
|
|
|
|
|
|
char *progname;
|
|
|
char *path;
|
|
@@ -35,6 +35,7 @@ static struct option longopts[] = {
|
|
|
{ "unique", required_argument, NULL, 'u' },
|
|
|
{ "yes", no_argument, NULL, 'y' },
|
|
|
{ "new", required_argument, NULL, 'n' },
|
|
|
+ { "arch", required_argument, NULL, 'a' },
|
|
|
{ NULL, 0, NULL, 0 }
|
|
|
};
|
|
|
|
|
@@ -49,6 +50,7 @@ void cmd_help(void){
|
|
|
printf(" -l, --list\t\t\tlist all the packages installed on this bootstrap\n");
|
|
|
printf(" -c, --clean\t\t\tclean a bad status file from duplicate entries\n");
|
|
|
printf(" -r, --repackage\t\trepackage to fix bad locations and to change architecture\n");
|
|
|
+ printf(" -a, --arch\t\t\tonly valid for repackage, specify the architecture to use when repackaging\n");
|
|
|
printf(" -b, --bump\t\t\trepackage and bump by one - number (ie 1.0-1 -> 1.0-2)\n");
|
|
|
printf(" -s, --skip\t\t\tskip code signature checks when bumping and repackaging\n");
|
|
|
printf(" -y, --yes\t\t\talways answer yes to prompts to overwrite files\n");
|
|
@@ -71,6 +73,7 @@ int main(int argc, char **argv) {
|
|
|
NSString *deletePackage = nil;
|
|
|
NSString *prefix = nil;
|
|
|
NSString *packagesFolder = nil;
|
|
|
+ NSString *arch = nil;
|
|
|
BOOL listPackage = FALSE;
|
|
|
BOOL repackage = FALSE;
|
|
|
BOOL skip = FALSE;
|
|
@@ -130,6 +133,11 @@ int main(int argc, char **argv) {
|
|
|
case 'u':
|
|
|
up = [NSString stringWithUTF8String:optarg];
|
|
|
break;
|
|
|
+
|
|
|
+ case 'a':
|
|
|
+ arch = [NSString stringWithUTF8String:optarg];
|
|
|
+ break;
|
|
|
+
|
|
|
case 'n':
|
|
|
new = TRUE;
|
|
|
packagesFolder = [NSString stringWithUTF8String:optarg];
|
|
@@ -148,7 +156,6 @@ int main(int argc, char **argv) {
|
|
|
//yDLog(@"bootstrap path: %@?", bootstrapPath);
|
|
|
//return 0;
|
|
|
}
|
|
|
-
|
|
|
if (up) {
|
|
|
NSArray *contents = [FM contentsOfDirectoryAtPath:up error:nil];
|
|
|
NSString *newFile = [[up lastPathComponent] stringByAppendingPathExtension:@"plist"];
|
|
@@ -164,7 +171,7 @@ int main(int argc, char **argv) {
|
|
|
}
|
|
|
|
|
|
if (repackage == TRUE && debFile) {
|
|
|
- return [HelperClass repackagePackageAtPath:debFile withPrefix:prefix sigChecks:skip];
|
|
|
+ return [HelperClass repackagePackageAtPath:debFile withPrefix:prefix sigChecks:skip arch:arch];
|
|
|
}
|
|
|
|
|
|
//DLog(@"folder: %@ project: %@", folder, project);
|