Commit e8cf6029 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

fixed linking scripts/

parent 4d42bcfe
...@@ -75,7 +75,7 @@ def cloneandcheckout(name,item): ...@@ -75,7 +75,7 @@ def cloneandcheckout(name,item):
shout("git pull") shout("git pull")
os.chdir(cwd) os.chdir(cwd)
def copy_eclipse_settings(name): def copy_eclipse_settings(name,return_path):
EPS = "eclipse_project_setup" EPS = "eclipse_project_setup"
if (not os.path.isfile(name+"/.project")) and (os.path.isdir(name+"/"+EPS)): if (not os.path.isfile(name+"/.project")) and (os.path.isdir(name+"/"+EPS)):
print(" Copying up files for Eclipse project") print(" Copying up files for Eclipse project")
...@@ -87,9 +87,13 @@ def copy_eclipse_settings(name): ...@@ -87,9 +87,13 @@ def copy_eclipse_settings(name):
elif os.path.isfile(name+"/.project"): elif os.path.isfile(name+"/.project"):
print("Not copying up files for Eclipse project: .project is already there") print("Not copying up files for Eclipse project: .project is already there")
# it does not have to be an Eclipse project
if (not os.path.islink(name+"/scripts")): if (not os.path.islink(name+"/scripts")):
shout("ln -sf ../../scripts/ "+name+"/scripts") # sub all character line into '..', keep '/'
print("Linked scripts to project") #regex = re.compile(r"[^/]+")
#return_path = regex.sub("..",name)
shout("ln -sf "+return_path+"/scripts "+name+"/scripts")
print("Linked scripts/ to project")
def read_local_conf(conf_file,pattern): def read_local_conf(conf_file,pattern):
...@@ -203,7 +207,7 @@ for p,v in Projects.items(): ...@@ -203,7 +207,7 @@ for p,v in Projects.items():
for k,l in v.items(): for k,l in v.items():
print("\n"+bcolors.BOLDWHITE+"*"+bcolors.ENDC+" "+k) print("\n"+bcolors.BOLDWHITE+"*"+bcolors.ENDC+" "+k)
cloneandcheckout(k,update_branch(project_branches,k,l,git_proto)) cloneandcheckout(k,update_branch(project_branches,k,l,git_proto))
copy_eclipse_settings(k) copy_eclipse_settings(k,"../..")
#special case for x393 fpga project #special case for x393 fpga project
if k=="x393": if k=="x393":
...@@ -219,7 +223,7 @@ for p,v in Projects.items(): ...@@ -219,7 +223,7 @@ for p,v in Projects.items():
elif isinstance(v,list): elif isinstance(v,list):
cloneandcheckout(p,update_branch(project_branches,p,v,git_proto)) cloneandcheckout(p,update_branch(project_branches,p,v,git_proto))
copy_eclipse_settings(p) copy_eclipse_settings(p,"..")
else: else:
print("Error?") print("Error?")
......
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