Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- ama_dir = os.path.join("amanda", "src")
- res_dir = os.path.join("amanda-resources", "Amanda205", "Amalib")
- caps = True
- def main():
- print("ama_dir: {}".format(ama_dir))
- print("res_dir: {}".format(res_dir))
- # Makes a list (files) of all files in ama_dir.
- for root, _, files in os.walk(ama_dir):
- # Loops through the list of files
- for f in files:
- if caps: target_f = "{}{}".format(f[0].upper(), f[1:])
- else: target_f = f
- cmd = "diff {} {}".format(os.path.join(ama_dir, f),
- os.path.join(res_dir, target_f))
- print(cmd)
- os.system(cmd)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment