File size: 587 Bytes
2cd560a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# ------------------------------------------------------------------------
# Copyright (c) 2022 megvii-research. All Rights Reserved.
# ------------------------------------------------------------------------
import argparse
from glob import glob
from subprocess import run
parser = argparse.ArgumentParser()
parser.add_argument('src')
parser.add_argument('dst')
args = parser.parse_args()
for src in glob(args.src+'/*/*.py') + glob(args.src+'/*.py'):
dst = src.replace(args.src, args.dst)
if run(['diff', src, dst]).returncode != 0:
print('code --diff', src, dst)
|