Testing: Updated Modules
Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
88658b7230
commit
865705024e
|
@ -100,7 +100,7 @@ class BuildXfce:
|
|||
def cleanup_helper(self):
|
||||
""" Clean up Helper to move the ISOs to the nightly location """
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.check_build_type_xfce()
|
||||
finish_cleanup.check_build_type()
|
||||
finish_cleanup.kill_old_iso()
|
||||
|
||||
|
||||
|
@ -194,7 +194,7 @@ class BuildGflashback:
|
|||
def cleanup_helper(self):
|
||||
""" Clean up Helper to move the ISOs to the nightly location """
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.check_build_type_gfb()
|
||||
finish_cleanup.check_build()
|
||||
finish_cleanup.kill_old_iso()
|
||||
|
||||
|
||||
|
|
|
@ -36,111 +36,39 @@ def make_check_sum():
|
|||
os.system(gen_sum)
|
||||
|
||||
|
||||
def check_build_type_xfce():
|
||||
""" Decided which ISO needs to be moved for XFCE """
|
||||
def check_build_type():
|
||||
""" Decided which ISO needs to be moved for nightly """
|
||||
# Make sure you are in fustao
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
def look_for_files(directory_path):
|
||||
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
|
||||
'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
|
||||
]
|
||||
directory_path = HOME_FOLDER + FUSATO_ROOT
|
||||
file_function_mapping = {
|
||||
'deb.64xfc': process_deb_64_xfce,
|
||||
'deb.32xfc': process_deb_32_xfce,
|
||||
'deb.armxfc': process_deb_arm_xfce,
|
||||
'dev.64xfc': process_dev_64_xfce,
|
||||
'dev.32xfc': process_dev_32_xfce,
|
||||
'dev.armxfc': process_dev_arm_xfce,
|
||||
'deb.64gfb' : process_deb_64_gfb,
|
||||
'deb.32gfb' : process_deb_32_gfb,
|
||||
'deb.armgfb' : process_deb_arm_gfb,
|
||||
'dev.64gfb' : process_dev_64_gfb,
|
||||
'dev.32gfb' : process_dev_32_gfb,
|
||||
'dev.armgfb' : process_dev_arm_gfb,
|
||||
}
|
||||
|
||||
|
||||
def check_debian_xfce():
|
||||
""" Check i a debian build is needed """
|
||||
for file_name in look_for_file:
|
||||
def check_build():
|
||||
""" Check what build is there and call the correct process function """
|
||||
for file_name, function_to_call in file_function_mapping.items():
|
||||
file_path = os.path.join(directory_path, file_name)
|
||||
|
||||
if os.path.exists(file_path):
|
||||
# Execute the corresponding function based on the file name
|
||||
function_name = f"process_{file_name.replace('.', '_')}"
|
||||
function_to_call = globals().get(function_name)
|
||||
|
||||
if function_to_call is not None and callable(function_to_call):
|
||||
print(file_path)
|
||||
if os.path.exists(file_path):
|
||||
function_to_call()
|
||||
else:
|
||||
print(f"Function {function_name} not defined.")
|
||||
else:
|
||||
print(f"File {file_name} not found. Need to wait.")
|
||||
|
||||
print(f"File {file_name} not found")
|
||||
|
||||
|
||||
def check_devuan_xfce():
|
||||
""" Check is a devuan build is needed """
|
||||
for build_version in look_for_file:
|
||||
if build_version == look_for_file[3]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_64_xfce()
|
||||
break
|
||||
elif build_version == look_for_file[4]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_32_xfce()
|
||||
break
|
||||
elif build_version == look_for_file[5]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_arm_xfce()
|
||||
break
|
||||
else:
|
||||
print("Nothing to do for Devuan")
|
||||
break
|
||||
check_debian_xfce()
|
||||
|
||||
|
||||
def check_build_type_gfb():
|
||||
""" Decided which ISO needs to be moved for gfb """
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
look_for_file = ['deb.64gfb', 'deb.32gfb', 'deb.armgfb'
|
||||
'dev.64gfb', 'dev.32gfb', 'dev.armgfb'
|
||||
]
|
||||
|
||||
def check_debian_gfb():
|
||||
""" Check is a debian build is needed """
|
||||
for build_version in look_for_file:
|
||||
if build_version == look_for_file[0]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_deb_64_gfb()
|
||||
break
|
||||
elif build_version == look_for_file[1]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_deb_32_gfb()
|
||||
break
|
||||
elif build_version == look_for_file[2]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_deb_arm_gfb()
|
||||
break
|
||||
else:
|
||||
check_devuan_gfb()
|
||||
break
|
||||
|
||||
|
||||
def check_devuan_gfb():
|
||||
""" Check is a debian build is needed """
|
||||
for build_version in look_for_file:
|
||||
if build_version == look_for_file[3]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_64_gfb()
|
||||
break
|
||||
elif build_version == look_for_file[4]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_32_gfb()
|
||||
break
|
||||
elif build_version == look_for_file[5]:
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_arm_gfb()
|
||||
break
|
||||
else:
|
||||
print("Nothing to do")
|
||||
break
|
||||
|
||||
check_debian_gfb()
|
||||
check_build()
|
||||
|
||||
|
||||
# Debian XFCE #
|
||||
|
@ -216,6 +144,7 @@ def process_deb_arm_xfce():
|
|||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
# Devuan XFCE #
|
||||
process_dev_64xfc
|
||||
def process_dev_64_xfce():
|
||||
"""
|
||||
Copy the NEW 64 bit Devuan base to its Nightly folder XFCE
|
||||
|
|
Loading…
Reference in New Issue