Updated: A bit more refractoring
Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
e64b4c39ad
commit
8298de6558
|
@ -23,10 +23,6 @@ BASE_DESTINATION = '/var/www/html/nightly/'
|
|||
BASE_NAME = 'PeppermintOS'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def make_check_sum():
|
||||
""" Generate the check sum files """
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
|
@ -39,10 +35,13 @@ def make_check_sum():
|
|||
gen_sum = sha + fiso + ' >' + fiso + ext
|
||||
os.system(gen_sum)
|
||||
|
||||
|
||||
def check_build_type():
|
||||
""" Simply used to change Directory to the root of fusato """
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc']
|
||||
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
|
||||
'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
|
||||
]
|
||||
|
||||
|
||||
def check_debian_xfce():
|
||||
|
@ -61,18 +60,38 @@ def check_build_type():
|
|||
if check_path.is_file():
|
||||
process_deb_arm_xfce()
|
||||
else:
|
||||
#check_devuan_xfce()
|
||||
check_devuan_xfce()
|
||||
print("Nothing to do")
|
||||
|
||||
|
||||
def check_devuan_xfce():
|
||||
""" Check is a devuan build is needed """
|
||||
for build_version in look_for_file:
|
||||
if build_version == 'dev.64xfc':
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_64_xfce()
|
||||
elif build_version == Path('dev.32xfc'):
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_32_xfce()
|
||||
elif build_version == Path('dev.armxfc'):
|
||||
check_path = Path(build_version)
|
||||
if check_path.is_file():
|
||||
process_dev_arm_xfce()
|
||||
else:
|
||||
#check_devuan_gfb()
|
||||
print("Nothing to do")
|
||||
|
||||
check_debian_xfce()
|
||||
|
||||
|
||||
|
||||
|
||||
# Debian XFCE #
|
||||
def process_deb_64_xfce():
|
||||
"""
|
||||
Copy the NEW 64 bit Debian base to its Nightly folder XFCE
|
||||
"""
|
||||
check_build_type()
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
|
@ -97,7 +116,6 @@ def process_deb_32_xfce():
|
|||
"""
|
||||
Copy the NEW 32 bit Debian base to its Nightly folder XFCE
|
||||
"""
|
||||
check_build_type()
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
|
@ -122,7 +140,6 @@ def process_deb_arm_xfce():
|
|||
"""
|
||||
Copy the NEW arm bit Debian base to its Nightly folder XFCE
|
||||
"""
|
||||
check_build_type()
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
|
@ -142,8 +159,77 @@ def process_deb_arm_xfce():
|
|||
os.rename(src_sum, rdes_sum)
|
||||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
# Devuan XFCE #
|
||||
def process_dev_64_xfce():
|
||||
"""
|
||||
Copy the NEW 64 bit Devuan base to its Nightly folder XFCE
|
||||
"""
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
if files.endswith('.iso'):
|
||||
src_iso = files
|
||||
rdes = (BASE_NAME + '-devuan_64_xfce'
|
||||
+ today +
|
||||
'.iso'
|
||||
)
|
||||
des_iso = BASE_DESTINATION + 'dev64/xfce'
|
||||
os.rename(src_iso, rdes)
|
||||
shutil.copy(rdes, des_iso)
|
||||
if files.endswith('.checksum'):
|
||||
src_sum = files
|
||||
rdes_sum = BASE_NAME + 'devuan_64_xfce-sha512.checksum'
|
||||
des_sum = BASE_DESTINATION + 'dev64/xfce'
|
||||
os.rename(src_sum, rdes_sum)
|
||||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
|
||||
def process_dev_32_xfce():
|
||||
"""
|
||||
Copy the NEW 32 bit Devuan base to its Nightly folder XFCE
|
||||
"""
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
if files.endswith('.iso'):
|
||||
src_iso = files
|
||||
rdes = (BASE_NAME + '-devuan_32_xfce'
|
||||
+ today +
|
||||
'.iso'
|
||||
)
|
||||
des_iso = BASE_DESTINATION + 'dev32/xfce'
|
||||
os.rename(src_iso, rdes)
|
||||
shutil.copy(rdes, des_iso)
|
||||
if files.endswith('.checksum'):
|
||||
src_sum = files
|
||||
rdes_sum = BASE_NAME + 'devuan_32_xfce-sha512.checksum'
|
||||
des_sum = BASE_DESTINATION + 'dev32/xfce'
|
||||
os.rename(src_sum, rdes_sum)
|
||||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
|
||||
def process_dev_arm_xfce():
|
||||
"""
|
||||
Copy the NEW arm bit Devuan base to its Nightly folder XFCE
|
||||
"""
|
||||
current_working_directory = os.listdir(".")
|
||||
today = str(date.today())
|
||||
for files in current_working_directory:
|
||||
if files.endswith('.iso'):
|
||||
src_iso = files
|
||||
rdes = (BASE_NAME + '-devuan_arm_xfce'
|
||||
+ today +
|
||||
'.iso'
|
||||
)
|
||||
des_iso = BASE_DESTINATION + 'devarm/xfce'
|
||||
os.rename(src_iso, rdes)
|
||||
shutil.copy(rdes, des_iso)
|
||||
if files.endswith('.checksum'):
|
||||
src_sum = files
|
||||
rdes_sum = BASE_NAME + 'devuan_arm_xfce-sha512.checksum'
|
||||
des_sum = BASE_DESTINATION + 'devarm/xfce'
|
||||
os.rename(src_sum, rdes_sum)
|
||||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
def copy_debian_gfb_based():
|
||||
""" Copy the new ISO debian base to its Nightly folder
|
||||
|
@ -272,6 +358,7 @@ def copy_debian_opb_based():
|
|||
shutil.copy(rdes_sum, des_sum)
|
||||
|
||||
|
||||
|
||||
def copy_devuan_xfce_based():
|
||||
""" Copy the new ISO devuan baseto its Nightly folder
|
||||
XFCE
|
||||
|
|
Loading…
Reference in New Issue