litex_setup: Add more comment, fix checkout when sha1 starting with 0.
This commit is contained in:
parent
1629bcbf30
commit
9f0a03100d
|
@ -16,7 +16,9 @@ if os.path.exists(".gitignore"):
|
|||
|
||||
# Repositories -------------------------------------------------------------------------------------
|
||||
|
||||
# name, (url, recursive clone, develop, sha1)
|
||||
# Get SHA1: git rev-parse HEAD
|
||||
|
||||
# Name, (URL, Recursive clone, Develop, SHA1)
|
||||
repos = [
|
||||
# HDL
|
||||
("migen", ("https://github.com/m-labs/", True, True, None)),
|
||||
|
@ -134,7 +136,7 @@ if "init" in sys.argv[1:]:
|
|||
subprocess.check_call("git clone " + full_url + " " + opts, shell=True)
|
||||
if sha1 is not None:
|
||||
os.chdir(os.path.join(current_path, name))
|
||||
os.system("git checkout {:7x}".format(sha1))
|
||||
os.system("git checkout {:040x}".format(sha1))
|
||||
|
||||
# Repositories update
|
||||
if "update" in sys.argv[1:]:
|
||||
|
@ -153,7 +155,7 @@ if "update" in sys.argv[1:]:
|
|||
subprocess.check_call("git submodule update --init --recursive", shell=True)
|
||||
if sha1 is not None:
|
||||
os.chdir(os.path.join(current_path, name))
|
||||
os.system("git checkout {:7x}".format(sha1))
|
||||
os.system("git checkout {:040x}".format(sha1))
|
||||
|
||||
# Repositories installation
|
||||
if "install" in sys.argv[1:]:
|
||||
|
|
Loading…
Reference in New Issue