Testing: Cleanup Module
Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
9ea7cd57e0
commit
88658b7230
|
@ -39,32 +39,29 @@ def make_check_sum():
|
||||||
def check_build_type_xfce():
|
def check_build_type_xfce():
|
||||||
""" Decided which ISO needs to be moved for XFCE """
|
""" Decided which ISO needs to be moved for XFCE """
|
||||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||||
|
def look_for_files(directory_path):
|
||||||
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
|
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
|
||||||
'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
|
'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def check_debian_xfce():
|
def check_debian_xfce():
|
||||||
""" Check is a debian build is needed """
|
""" Check i a debian build is needed """
|
||||||
for build_version in look_for_file:
|
for file_name in look_for_file:
|
||||||
if build_version == look_for_file[0]:
|
file_path = os.path.join(directory_path, file_name)
|
||||||
check_path = Path(build_version)
|
|
||||||
if check_path.is_file():
|
if os.path.exists(file_path):
|
||||||
process_deb_64_xfce()
|
# Execute the corresponding function based on the file name
|
||||||
break
|
function_name = f"process_{file_name.replace('.', '_')}"
|
||||||
elif build_version == look_for_file[1]:
|
function_to_call = globals().get(function_name)
|
||||||
check_path = Path(build_version)
|
|
||||||
if check_path.is_file():
|
if function_to_call is not None and callable(function_to_call):
|
||||||
process_deb_32_xfce()
|
function_to_call()
|
||||||
break
|
|
||||||
elif build_version == look_for_file[2]:
|
|
||||||
check_path = Path(build_version)
|
|
||||||
if check_path.is_file():
|
|
||||||
process_deb_arm_xfce()
|
|
||||||
break
|
|
||||||
else:
|
else:
|
||||||
check_devuan_xfce()
|
print(f"Function {function_name} not defined.")
|
||||||
break
|
else:
|
||||||
|
print(f"File {file_name} not found. Need to wait.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def check_devuan_xfce():
|
def check_devuan_xfce():
|
||||||
|
@ -86,10 +83,11 @@ def check_build_type_xfce():
|
||||||
process_dev_arm_xfce()
|
process_dev_arm_xfce()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print("Nothing to do")
|
print("Nothing to do for Devuan")
|
||||||
break
|
break
|
||||||
check_debian_xfce()
|
check_debian_xfce()
|
||||||
|
|
||||||
|
|
||||||
def check_build_type_gfb():
|
def check_build_type_gfb():
|
||||||
""" Decided which ISO needs to be moved for gfb """
|
""" Decided which ISO needs to be moved for gfb """
|
||||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||||
|
@ -442,7 +440,7 @@ def process_dev_arm_gfb():
|
||||||
shutil.copy(rdes_sum, des_sum)
|
shutil.copy(rdes_sum, des_sum)
|
||||||
|
|
||||||
|
|
||||||
|
# Debian OpenBox
|
||||||
def copy_debian_opb_based():
|
def copy_debian_opb_based():
|
||||||
""" Copy the new ISO debian base to its Nightly folder
|
""" Copy the new ISO debian base to its Nightly folder
|
||||||
OpenBox
|
OpenBox
|
||||||
|
@ -506,7 +504,7 @@ def copy_debian_opb_based():
|
||||||
os.rename(src_sum, rdes_sum)
|
os.rename(src_sum, rdes_sum)
|
||||||
shutil.copy(rdes_sum, des_sum)
|
shutil.copy(rdes_sum, des_sum)
|
||||||
|
|
||||||
|
# Devuan OpenBox
|
||||||
def copy_devuan_opb_based():
|
def copy_devuan_opb_based():
|
||||||
""" Copy the new ISO devuan base to its Nightly folder
|
""" Copy the new ISO devuan base to its Nightly folder
|
||||||
OpenBox
|
OpenBox
|
||||||
|
|
Loading…
Reference in New Issue