aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-homebrew-formula.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build-homebrew-formula.py')
-rwxr-xr-xscripts/build-homebrew-formula.py16
1 files changed, 8 insertions, 8 deletions
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))