[zipdiff-cvs] zipdiff/src/main/zipdiff Main.java,1.6,1.7
Status: Alpha
Brought to you by:
sullis
From: Sean S. <su...@us...> - 2004-06-27 19:07:05
|
Update of /cvsroot/zipdiff/zipdiff/src/main/zipdiff In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18608/src/main/zipdiff Modified Files: Main.java Log Message: Index: Main.java =================================================================== RCS file: /cvsroot/zipdiff/zipdiff/src/main/zipdiff/Main.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Main.java 9 Jun 2004 15:26:19 -0000 1.6 --- Main.java 27 Jun 2004 19:06:52 -0000 1.7 *************** *** 13,17 **** /** * ! * Provides a command line interface to Zipdiff * * @author Sean C. Sullivan, J.Stewart --- 13,17 ---- /** * ! * Provides a command line interface to zipdiff * * @author Sean C. Sullivan, J.Stewart *************** *** 23,26 **** --- 23,27 ---- private static final String OPTION_COMPARE_CRC_VALUES = "comparecrcvalues"; private static final String OPTION_COMPARE_TIMESTAMPS = "comparetimestamps"; + private static final String OPTION_IGNORE_CVS_FILES = "ignorecvsfiles"; private static final String OPTION_FILE1 = "file1"; private static final String OPTION_FILE2 = "file2"; *************** *** 54,59 **** true, "regular expression to match files to exclude e.g. (?i)meta-inf.*"); ! file2.setRequired(false); Option exitWithError = new Option( --- 55,68 ---- true, "regular expression to match files to exclude e.g. (?i)meta-inf.*"); ! regex.setRequired(false); + Option ignoreCVSFilesOption = + new Option( + OPTION_IGNORE_CVS_FILES, + OPTION_IGNORE_CVS_FILES, + false, + "ignore CVS files"); + ignoreCVSFilesOption.setRequired(false); + Option exitWithError = new Option( *************** *** 75,78 **** --- 84,88 ---- options.addOption(file2); options.addOption(regex); + options.addOption(ignoreCVSFilesOption); options.addOption(exitWithError); options.addOption(dontShowDifferences); *************** *** 136,139 **** --- 146,157 ---- } + if (line.hasOption(OPTION_IGNORE_CVS_FILES)) { + calc.setIgnoreCVSFiles(true); + } + else + { + calc.setIgnoreCVSFiles(false); + } + if (line.hasOption(OPTION_COMPARE_TIMESTAMPS)) { calc.setIgnoreTimestamps(false); *************** *** 176,180 **** System.err.println(pex.getMessage()); HelpFormatter formatter = new HelpFormatter(); ! formatter.printHelp("zipdiff [options] ", options); System.exit(EXITCODE_ERROR); } catch (Exception ex) { --- 194,198 ---- System.err.println(pex.getMessage()); HelpFormatter formatter = new HelpFormatter(); ! formatter.printHelp("zipdiff.Main [options] ", options); System.exit(EXITCODE_ERROR); } catch (Exception ex) { |