diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-02-12 22:02:16 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-02-12 22:02:16 +0000 |
commit | 33aefe215a7296bf14ac84d9cb886472ece34c27 (patch) | |
tree | 9757ad12a94229d60b591902acd0a650ee07cde9 /src | |
parent | 57d0125bf2d16fe57c06e9fc7431577048ca5b01 (diff) | |
download | bcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.tar.gz bcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.tar.bz2 bcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.zip |
Add -r mode to compare
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2804 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2-admin | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 549d89176..6144fa341 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -214,6 +214,18 @@ def compare(new, old): def do_compare(args): '''run file comparison''' + if '-r' in args: + args.remove('-r') + (oldd, newd) = args + (old, new) = [os.listdir(spot) for spot in args] + for item in old: + print item + do_compare(oldd + '/' + item, newd + '/' + item) + old.remove(item) + new.remove(item) + if new: + print "new has extra entries", new + return try: (old, new) = args except IndexError: |