File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -28,21 +28,15 @@ def setup_repositories():
28
28
"samples" : "https://github.com/DefangLabs/samples.git"
29
29
}
30
30
31
- # Change to the temporary directory
32
- original_dir = os .getcwd ()
33
- os .chdir (tmp_dir )
34
-
35
31
# Clone each repository
36
32
for repo_name , repo_url in repos .items ():
37
- clone_repository (repo_url , repo_name )
38
-
39
- # Return to the original directory
40
- os .chdir (original_dir )
33
+ clone_repository (repo_url , os .path .join (tmp_dir , repo_name ))
41
34
42
35
def run_prebuild_script ():
43
36
""" Run the 'prebuild.sh' script located in the .tmp directory. """
44
37
os .chdir (".tmp" )
45
38
script_path = os .path .join ("./" , "prebuild.sh" ) # Ensure the path is correct
39
+ os .chdir (".." )
46
40
if os .path .exists (script_path ):
47
41
print ("Running prebuild.sh..." )
48
42
try :
@@ -173,8 +167,5 @@ def recursive_parse_directory(root_dir):
173
167
if __name__ == "__main__" :
174
168
setup_repositories ()
175
169
run_prebuild_script ()
176
- os .chdir ('../../' )
177
- print (os .listdir ('.' ))
178
170
parse_markdown () # Start parsing logic after all setups
179
- print (os .listdir ('.' ))
180
171
print ("All processes completed successfully." )
You can’t perform that action at this time.
0 commit comments