Commit 2766ecba by anatoly techtonik Committed by Jamie Madill

Add cmdline help to commit_id.py

Change-Id: I2b87e0b60f40d345388562e33ed8eb7010adf186 Reviewed-on: https://chromium-review.googlesource.com/349040Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c8ec0b20
...@@ -2,12 +2,16 @@ import subprocess as sp ...@@ -2,12 +2,16 @@ import subprocess as sp
import sys import sys
import os import os
# Usage: commit_id.py check <angle_dir> (checks if git is present) usage = """\
# Usage: commit_id.py gen <angle_dir> <file_to_write> (generates commit id) Usage: commit_id.py check <angle_dir> - check if git is present
commit_id.py gen <angle_dir> <file_to_write> - generate commit.h"""
def grab_output(command, cwd): def grab_output(command, cwd):
return sp.Popen(command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip() return sp.Popen(command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip()
if len(sys.argv) < 3:
sys.exit(usage)
operation = sys.argv[1] operation = sys.argv[1]
cwd = sys.argv[2] cwd = sys.argv[2]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment