aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-15 10:21:18 +0800
committerAaron LI <aly@aaronly.me>2017-08-15 10:21:18 +0800
commit75752577aea888de365e53982e3a101f35d01b56 (patch)
tree6087880a8bbb9d8c79e14689acb008d120c49c0c
parent5a2224df66451989f75c1781f4f216e6eee5d92e (diff)
downloadchandra-acis-analysis-75752577aea888de365e53982e3a101f35d01b56.tar.bz2
update_manifest.py: Add argument --create
-rwxr-xr-xbin/update_manifest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/update_manifest.py b/bin/update_manifest.py
index ca1cf27..1cfe05b 100755
--- a/bin/update_manifest.py
+++ b/bin/update_manifest.py
@@ -54,10 +54,17 @@ def add_repro(reprodir, manifest):
def main():
parser = argparse.ArgumentParser(
description="Update manifest.yaml with generated products")
+ parser.add_argument("-c", "--create", dest="create",
+ action="store_true",
+ help="create 'manifest.yaml' under current working " +
+ "directory if necessary")
parser.add_argument("-r", "--repro", dest="reprodir", default=None,
help="path to the repro directory; add the " +
"reprocessed products to manifest if specified")
args = parser.parse_args()
+
+ if args.create:
+ open("manifest.yaml", "a").close()
manifest = get_manifest()
if args.reprodir: