diff options
author | Damien George <damien.p.george@gmail.com> | 2017-09-06 13:40:51 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-09-06 13:40:51 +1000 |
commit | 01dd7804b87d60b2deab16712eccb3b97351a9b7 (patch) | |
tree | 1aa21f38a872b8e62a3d4e4f74f68033c6f827e4 /zephyr/makeprj.py | |
parent | a9862b30068fc9df1022f08019fb35aaa5085f64 (diff) |
ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
Diffstat (limited to 'zephyr/makeprj.py')
-rw-r--r-- | zephyr/makeprj.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/zephyr/makeprj.py b/zephyr/makeprj.py deleted file mode 100644 index 239c877cd..000000000 --- a/zephyr/makeprj.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 -import sys -import os -import hashlib - - -def hash_file(fname): - if not os.path.exists(fname): - return b"" - hasher = hashlib.md5() - with open(fname, "rb") as f: - hasher.update(f.read()) - return hasher.digest() - - -old_digest = hash_file(sys.argv[3]) - -with open(sys.argv[3] + ".tmp", "wb") as f: - f.write(open(sys.argv[1], "rb").read()) - if os.path.exists(sys.argv[2]): - f.write(open(sys.argv[2], "rb").read()) - -new_digest = hash_file(sys.argv[3] + ".tmp") - -if new_digest != old_digest: - print("Replacing") - os.rename(sys.argv[3] + ".tmp", sys.argv[3]) -else: - os.remove(sys.argv[3] + ".tmp") |