From ad9e1b42e2f42d7febe601db194381ecc0ff32e9 Mon Sep 17 00:00:00 2001 From: Jeff Candy Date: Mon, 4 Nov 2024 17:34:54 -0800 Subject: [PATCH] Added ignore feature --- cgyro/bin/cgyrodb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cgyro/bin/cgyrodb b/cgyro/bin/cgyrodb index d0b5c489c..38751beb1 100755 --- a/cgyro/bin/cgyrodb +++ b/cgyro/bin/cgyrodb @@ -26,12 +26,12 @@ def opts(): prog = 'cgyrodb', description="CGYRO database utility", epilog=textwrap.dedent(mytext)) - + parser.add_argument('-mode', help='Mode switch (data,update)', type=str, default='data') - + args=parser.parse_args() return args.mode @@ -73,16 +73,19 @@ def gendict(sim,mode): return mydict +ignore = 'eslshared' + # First locate all directories y = [] for root,xd,xf in os.walk('./'): if xd == []: - y.append(root) + if ignore not in root: + y.append(root) if mode == 'update': # Run through directories and update for mdir in y: - print('Updating '+mdir) + print('Updating '+mdir) os.system('cgyro -t '+mdir) else: # Create master dictionary "meta"