Skip to content

Commit

Permalink
Added ignore feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Nov 5, 2024
1 parent 023a7a1 commit ad9e1b4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cgyro/bin/cgyrodb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit ad9e1b4

Please sign in to comment.