mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
scripts: switch update-project-files.py to Python3
This commit is contained in:
parent
97aa3dff0e
commit
3d1d4fe2cf
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python -Es
|
||||
#!/usr/bin/env python3
|
||||
# vim: et:sw=4:ts=4:sts=4
|
||||
#
|
||||
# Script regenerates project file list from the list of files tracked by Git.
|
||||
|
|
@ -28,13 +28,13 @@ def run(command):
|
|||
raise Exception("Command %s failed.", command)
|
||||
return out
|
||||
|
||||
print >>sys.stderr, "Updating %s." % OUTPUT_FILE
|
||||
print("Updating %s." % OUTPUT_FILE, file=sys.stderr)
|
||||
|
||||
git_root = run(["git", "rev-parse", "--show-toplevel"]).strip()
|
||||
os.chdir(git_root)
|
||||
|
||||
command = ["git", "ls-files"] + SOURCES
|
||||
files = run(command).splitlines() + SOURCES_EXTRA
|
||||
files = run(command).decode("utf-8").splitlines() + SOURCES_EXTRA
|
||||
|
||||
with open(OUTPUT_FILE, "w") as output:
|
||||
output.write("\n".join(sorted(files)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue