From 5b30621b8ab1a3bafcf95fb9f0371bbbe40a19ff Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 5 Aug 2012 20:20:42 +0200 Subject: [PATCH] Changed: Simplify the command --HG-- branch : build_pipeline_v3 --- code/nel/tools/misc/bnp_make/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/misc/bnp_make/main.cpp b/code/nel/tools/misc/bnp_make/main.cpp index 174ade975..4b7a13e49 100644 --- a/code/nel/tools/misc/bnp_make/main.cpp +++ b/code/nel/tools/misc/bnp_make/main.cpp @@ -336,7 +336,7 @@ void usage() { printf ("USAGE : \n"); printf (" bnp_make /p [] [] [option] ... [option]\n"); - printf (" bnp_make /pp [-dir directory_name] [-dir ...] [option] ... [option]\n"); + printf (" bnp_make /p -dir directory_name [-dir ...] [option] ... [option]\n"); printf (" option : \n"); printf (" -if wildcard : add the file if it matches the wilcard (at least one 'if' conditions must be met for a file to be adding)\n"); printf (" -ifnot wildcard : add the file if it doesn't match the wilcard (all the 'ifnot' conditions must be met for a file to be adding)\n"); @@ -403,13 +403,16 @@ int main (int nNbArg, char **ppArgs) return -1; } - if (strcmp(ppArgs[1], "/pp") == 0) + bool cmdPack = (strcmp(ppArgs[1], "/p") == 0) || (strcmp(ppArgs[1], "/P") == 0) || + (strcmp(ppArgs[1], "-p") == 0) || (strcmp(ppArgs[1], "-P") == 0); + + if (cmdPack && gDirectories.size() > 0) { // Pack a directory uint count = readOptions(nNbArg, ppArgs); nNbArg -= count; - if (nNbArg < 3 || gDirectories.size() == 0) + if (nNbArg < 3) { usage(); return -1; @@ -423,8 +426,7 @@ int main (int nNbArg, char **ppArgs) gBNPHeader.append(gDestBNPFile); } - if ((strcmp(ppArgs[1], "/p") == 0) || (strcmp(ppArgs[1], "/P") == 0) || - (strcmp(ppArgs[1], "-p") == 0) || (strcmp(ppArgs[1], "-P") == 0)) + if (cmdPack && gDirectories.size() == 0) { // Pack a directory uint count = readOptions (nNbArg, ppArgs);