From 33aefe215a7296bf14ac84d9cb886472ece34c27 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 12 Feb 2007 22:02:16 +0000 Subject: Add -r mode to compare git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2804 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2-admin | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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: -- cgit v1.2.3-1-g7c22