diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-debian-control-files.py | 4 | ||||
-rwxr-xr-x | scripts/build-homebrew-formula.py | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/scripts/build-debian-control-files.py b/scripts/build-debian-control-files.py index cb679b2..a6ff169 100755 --- a/scripts/build-debian-control-files.py +++ b/scripts/build-debian-control-files.py @@ -10,7 +10,7 @@ parser.add_argument("--debemail", required = True) parser.add_argument("--package", required = True) parser.add_argument("--newversion", required = True) parser.add_argument("--description", default = "Software and firmware for Cryptech Alpha development board.") -parser.add_argument("--conflicts", nargs = "*") +parser.add_argument("--conflicts", default = "") args = parser.parse_args() @@ -43,7 +43,7 @@ Description: Cryptech Project open-source cryptographic software and firmware. ''' if args.conflicts: - conflicts = "Conflicts: {}\n".format(" ".join(args.conflicts)) + conflicts = "Conflicts: {}\n".format(args.conflicts) else: conflicts = "" diff --git a/scripts/build-homebrew-formula.py b/scripts/build-homebrew-formula.py index 618eb77..adffa10 100755 --- a/scripts/build-homebrew-formula.py +++ b/scripts/build-homebrew-formula.py @@ -8,12 +8,12 @@ import sys import os parser = argparse.ArgumentParser() -parser.add_argument("--url-base", default = "https://brew.cryptech.is/tarballs/") -parser.add_argument("--tarball", required = True) -parser.add_argument("--package", required = True) -parser.add_argument("--version", required = True) -parser.add_argument("--formula", type = argparse.FileType("w"), nargs = "?", default = sys.stdout) -parser.add_argument("--conflicts", nargs = "*") +parser.add_argument("--url-base", default = "https://brew.cryptech.is/tarballs/") +parser.add_argument("--tarball", required = True) +parser.add_argument("--package", required = True) +parser.add_argument("--version", required = True) +parser.add_argument("--formula", type = argparse.FileType("w"), nargs = "?", default = sys.stdout) +parser.add_argument("--conflicts", default = "") args = parser.parse_args() template = '''\ @@ -105,8 +105,8 @@ with open(args.tarball, "rb") as f: classname = "".join(word.capitalize() for word in args.package.split("-")) -conflicts = "".join(" conflicts_with \"{}\", :because => \"HSM firmware and PKCS #11 library must match each other\"\n".format(i) - for i in args.conflicts) +conflicts = "".join(" conflicts_with \"{}\", :because => \"HSM firmware and PKCS #11 library must match\"\n".format(conflict) + for conflict in args.conflicts.split()) url = os.path.join(args.url_base, os.path.basename(args.tarball)) |