Skip to content

Commit fa1b225

Browse files
committed
GDC Client was updated. Working on quick fix. This will need more work in future
1 parent b46234a commit fa1b225

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

build/hcmi/02-getHCMIData.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,23 @@ def download_tool(url):
3535

3636
filename = wget.download(url)
3737
files_before = os.listdir()
38-
shutil.unpack_archive(filename)
39-
files_after = os.listdir()
40-
new_file = str(next(iter((set(files_after) - set(files_before)))))
41-
st = os.stat(new_file)
42-
os.chmod(new_file, st.st_mode | stat.S_IEXEC)
43-
return filename
38+
# shutil.unpack_archive(filename)
39+
40+
#This is just set for AWS to debug. This will have to be mapped to OS. They changed their file structure. This should be updated.
41+
shutil.unpack_archive("gdc-client_2.3_Ubuntu_x64.zip")
42+
if not os.path.exists('gdc-client'):
43+
raise FileNotFoundError("gdc-client executable not found after extraction.")
44+
# Ensure 'gdc-client' is executable
45+
st = os.stat('gdc-client')
46+
os.chmod('gdc-client', st.st_mode | stat.S_IEXEC)
47+
# Return the path to the executable
48+
return './gdc-client'
49+
50+
# files_after = os.listdir()
51+
# new_file = str(next(iter((set(files_after) - set(files_before)))))
52+
# st = os.stat(new_file)
53+
# os.chmod(new_file, st.st_mode | stat.S_IEXEC)
54+
# return filename
4455

4556
def is_tool(name):
4657
"""

0 commit comments

Comments
 (0)