litex_setup: Fix git checkout to specific version (we are using short sha1 hashes).
This commit is contained in:
parent
57002cf3fc
commit
f92a185109
|
@ -136,7 +136,7 @@ if "init" in sys.argv[1:]:
|
||||||
subprocess.check_call("git clone " + full_url + " " + opts, shell=True)
|
subprocess.check_call("git clone " + full_url + " " + opts, shell=True)
|
||||||
if sha1 is not None:
|
if sha1 is not None:
|
||||||
os.chdir(os.path.join(current_path, name))
|
os.chdir(os.path.join(current_path, name))
|
||||||
os.system("git checkout {:040x}".format(sha1))
|
os.system("git checkout {:07x}".format(sha1))
|
||||||
|
|
||||||
# Repositories update
|
# Repositories update
|
||||||
if "update" in sys.argv[1:]:
|
if "update" in sys.argv[1:]:
|
||||||
|
@ -155,7 +155,7 @@ if "update" in sys.argv[1:]:
|
||||||
subprocess.check_call("git submodule update --init --recursive", shell=True)
|
subprocess.check_call("git submodule update --init --recursive", shell=True)
|
||||||
if sha1 is not None:
|
if sha1 is not None:
|
||||||
os.chdir(os.path.join(current_path, name))
|
os.chdir(os.path.join(current_path, name))
|
||||||
os.system("git checkout {:040x}".format(sha1))
|
os.system("git checkout {:07x}".format(sha1))
|
||||||
|
|
||||||
# Repositories installation
|
# Repositories installation
|
||||||
if "install" in sys.argv[1:]:
|
if "install" in sys.argv[1:]:
|
||||||
|
|
Loading…
Reference in New Issue