Changeset e1da9dc in rtems-libbsd for freebsd-to-rtems.py


Ignore:
Timestamp:
Mar 12, 2012, 1:34:29 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
3f7b966
Parents:
7326d96
Message:

Fix dry run bug and change name of filesChanged variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-to-rtems.py

    r7326d96 re1da9dc  
    5151isOnlyMakefile = False
    5252tempFile = "/tmp/tmp_FBRT"
    53 filesChanged = 0
     53filesProcessed = 0
    5454
    5555def usage():
     
    6868def parseArguments():
    6969  global RTEMS_DIR, FreeBSD_DIR
    70   global isVerbose, isForward, isEarlyExit, isOnlyMakefile, isDiffMode
     70  global isVerbose, isForward, isDryRun, isEarlyExit
     71  global isOnlyMakefile, isDiffMode
    7172  try:
    7273    opts, args = getopt.getopt(sys.argv[1:], "?hdDemRr:f:v",
     
    9596      sys.exit()
    9697    elif o in ("-d", "--dry-run"):
    97       isForward = False
     98      isDryRun = True
    9899    elif o in ("-D", "--diff"):
    99100      isDiffMode = True
     
    166167#  + copy or diff depending on execution mode
    167168def processIfDifferent(new, old, desc, src):
    168   global filesChanged
     169  global filesProcessed
    169170  # print new + " " + old + " X" + desc + "X "  + src
    170171  if not os.path.exists(old) or \
    171172     filecmp.cmp(new, old, shallow=False) == False:
    172     filesChanged += 1
     173    filesProcessed += 1
    173174    if isDiffMode == False:
    174175      # print "Move " + new + " to " + old
     
    18791880# Print a summary if changing files
    18801881if isDiffMode == False:
    1881   if filesChanged == 1:
    1882     print str(filesChanged) + " file was changed."
     1882  if filesProcessed == 1:
     1883    print str(filesProcessed) + " file was changed."
    18831884  else:
    1884     print str(filesChanged) + " files were changed."
     1885    print str(filesProcessed) + " files were changed."
Note: See TracChangeset for help on using the changeset viewer.