2023-07-11 06:48:53 +00:00
|
|
|
"""
|
|
|
|
* Author: "PeppermintOS Team(peppermintosteam@proton.me)
|
|
|
|
*
|
|
|
|
* License: SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*
|
|
|
|
* Clean up the working folder and move ISO and other files
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
from pathlib import Path
|
|
|
|
from datetime import date
|
2023-09-07 03:44:34 +00:00
|
|
|
import time
|
2023-09-06 10:27:28 +00:00
|
|
|
|
2023-07-11 06:48:53 +00:00
|
|
|
# Set the home path used regardless the user logged in
|
2023-09-05 14:38:55 +00:00
|
|
|
BSTRING_ISO_CONFIGS = '~/bubbles/iso_configs'
|
|
|
|
HOME_FOLDER = str(Path(BSTRING_ISO_CONFIGS).expanduser())
|
|
|
|
FUSATO_ROOT = '/fusato'
|
2023-10-19 04:52:08 +00:00
|
|
|
# Set the base destination location for the final ISO
|
|
|
|
# Default base is /var/www/html/nightly/
|
|
|
|
BASE_DESTINATION = '/var/www/html/nightly/'
|
|
|
|
# Set the base ISO Name
|
|
|
|
BASE_NAME = 'PeppermintOS'
|
|
|
|
|
|
|
|
|
2023-07-11 06:48:53 +00:00
|
|
|
def make_check_sum():
|
|
|
|
""" Generate the check sum files """
|
2023-09-05 14:38:55 +00:00
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-07 01:48:15 +00:00
|
|
|
current_working_directory = os.getcwd().replace('/', '/')
|
|
|
|
for root, dirs, files in os.walk(current_working_directory):
|
2023-07-11 06:48:53 +00:00
|
|
|
for fiso in files:
|
|
|
|
if fiso.endswith('.iso'):
|
|
|
|
sha = "sha512sum "
|
|
|
|
ext = "-sha512.checksum"
|
|
|
|
gen_sum = sha + fiso + ' >' + fiso + ext
|
|
|
|
os.system(gen_sum)
|
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
|
2023-10-19 04:52:08 +00:00
|
|
|
def check_build_type():
|
|
|
|
""" Simply used to change Directory to the root of fusato """
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-10-19 06:30:49 +00:00
|
|
|
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
|
|
|
|
'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
|
|
|
|
]
|
2023-07-11 06:48:53 +00:00
|
|
|
|
2023-10-19 04:52:08 +00:00
|
|
|
|
|
|
|
def check_debian_xfce():
|
|
|
|
""" Check is a debian build is needed """
|
|
|
|
for build_version in look_for_file:
|
2023-10-19 10:18:56 +00:00
|
|
|
if build_version == look_for_file[0]:
|
2023-10-19 04:52:08 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_deb_64_xfce()
|
2023-10-19 10:06:40 +00:00
|
|
|
break
|
2023-10-19 10:18:56 +00:00
|
|
|
elif build_version == look_for_file[1]:
|
2023-10-19 04:52:08 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_deb_32_xfce()
|
2023-10-19 10:06:40 +00:00
|
|
|
break
|
2023-10-19 10:18:56 +00:00
|
|
|
elif build_version == look_for_file[2]:
|
2023-10-19 04:52:08 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_deb_arm_xfce()
|
2023-10-19 10:06:40 +00:00
|
|
|
break
|
2023-10-19 04:52:08 +00:00
|
|
|
else:
|
2023-10-19 10:06:40 +00:00
|
|
|
#check_devuan_xfce()
|
2023-10-19 06:30:49 +00:00
|
|
|
print("Nothing to do")
|
|
|
|
|
|
|
|
|
|
|
|
def check_devuan_xfce():
|
|
|
|
""" Check is a devuan build is needed """
|
|
|
|
for build_version in look_for_file:
|
2023-10-19 10:18:56 +00:00
|
|
|
if build_version == look_for_file[3]:
|
2023-10-19 06:30:49 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_dev_64_xfce()
|
2023-10-19 10:18:56 +00:00
|
|
|
elif build_version == look_for_file[4]:
|
2023-10-19 06:30:49 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_dev_32_xfce()
|
2023-10-19 10:18:56 +00:00
|
|
|
elif build_version == look_for_file[5]:
|
2023-10-19 06:30:49 +00:00
|
|
|
check_path = Path(build_version)
|
|
|
|
if check_path.is_file():
|
|
|
|
process_dev_arm_xfce()
|
|
|
|
else:
|
|
|
|
#check_devuan_gfb()
|
2023-10-19 04:52:08 +00:00
|
|
|
print("Nothing to do")
|
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
check_debian_xfce()
|
2023-10-19 04:52:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
# Debian XFCE #
|
2023-10-19 04:52:08 +00:00
|
|
|
def process_deb_64_xfce():
|
|
|
|
"""
|
|
|
|
Copy the NEW 64 bit Debian base to its Nightly folder XFCE
|
2023-09-05 14:38:55 +00:00
|
|
|
"""
|
2023-09-07 13:42:48 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 06:48:53 +00:00
|
|
|
today = str(date.today())
|
2023-10-19 04:52:08 +00:00
|
|
|
for files in current_working_directory:
|
|
|
|
if files.endswith('.iso'):
|
|
|
|
src_iso = files
|
|
|
|
rdes = (BASE_NAME + '-Debian_64_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = BASE_DESTINATION + 'deb64/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if files.endswith('.checksum'):
|
|
|
|
src_sum = files
|
|
|
|
rdes_sum = BASE_NAME + 'Debian_64_xfce-sha512.checksum'
|
|
|
|
des_sum = BASE_DESTINATION + 'deb64/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
|
|
|
|
|
|
|
|
def process_deb_32_xfce():
|
|
|
|
"""
|
|
|
|
Copy the NEW 32 bit Debian 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 + '-Debian_32_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = BASE_DESTINATION + 'deb32/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if files.endswith('.checksum'):
|
|
|
|
src_sum = files
|
|
|
|
rdes_sum = BASE_NAME + 'Debian_32_xfce-sha512.checksum'
|
|
|
|
des_sum = BASE_DESTINATION + 'deb32/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
|
|
|
|
|
|
|
|
def process_deb_arm_xfce():
|
|
|
|
"""
|
|
|
|
Copy the NEW arm bit Debian 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 + '-Debian_arm_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = BASE_DESTINATION + 'debarm/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if files.endswith('.checksum'):
|
|
|
|
src_sum = files
|
|
|
|
rdes_sum = BASE_NAME + 'Debian_arm_xfce-sha512.checksum'
|
|
|
|
des_sum = BASE_DESTINATION + 'debarm/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
# 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)
|
2023-09-07 13:42:48 +00:00
|
|
|
|
2023-09-05 14:38:55 +00:00
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
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)
|
2023-09-05 14:38:55 +00:00
|
|
|
|
|
|
|
def copy_debian_gfb_based():
|
|
|
|
""" Copy the new ISO debian base to its Nightly folder
|
|
|
|
Gnome Flashback
|
|
|
|
"""
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-07 13:42:48 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 06:48:53 +00:00
|
|
|
today = str(date.today())
|
2023-09-07 13:42:48 +00:00
|
|
|
look_for_file_64 = Path('deb.64gfb')
|
|
|
|
look_for_file_32 = Path('deb.32gfb')
|
|
|
|
look_for_file_arm = Path('deb.armgfb')
|
2023-09-05 14:38:55 +00:00
|
|
|
|
2023-09-07 13:42:48 +00:00
|
|
|
if look_for_file_64.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_64_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/deb64/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-Debian_64_gfb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/deb64/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_32.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_32_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/deb32/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-Debian_32-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/deb32/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_arm.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_arm_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/debarm/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-Debian_arm_gfb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/debarm/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
2023-09-05 14:38:55 +00:00
|
|
|
|
|
|
|
def copy_debian_opb_based():
|
|
|
|
""" Copy the new ISO debian base to its Nightly folder
|
|
|
|
OpenBox
|
|
|
|
"""
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-07 13:42:48 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 06:48:53 +00:00
|
|
|
today = str(date.today())
|
2023-09-07 13:42:48 +00:00
|
|
|
look_for_file_64 = Path('deb.64opb')
|
|
|
|
look_for_file_32 = Path('deb.32opb')
|
|
|
|
look_for_file_arm = Path('deb.armopb')
|
|
|
|
|
|
|
|
if look_for_file_64.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_64_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/deb64/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-Debian_64_opb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/deb64/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_32.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_32_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/deb32/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-Debian_32_opb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/deb32/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_arm.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-Debian_arm_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/debarm/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
2023-09-08 13:56:16 +00:00
|
|
|
rdes_sum = 'PeppermintOS-Debian_arm_opb-sha512.checksum'
|
2023-09-07 13:42:48 +00:00
|
|
|
des_sum = '/var/www/html/nightly/debarm/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
2023-09-05 14:38:55 +00:00
|
|
|
|
|
|
|
|
2023-10-19 06:30:49 +00:00
|
|
|
|
2023-09-05 14:38:55 +00:00
|
|
|
def copy_devuan_xfce_based():
|
2023-09-08 13:56:16 +00:00
|
|
|
""" Copy the new ISO devuan baseto its Nightly folder
|
2023-09-05 14:38:55 +00:00
|
|
|
XFCE
|
|
|
|
"""
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-08 13:56:16 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 12:43:25 +00:00
|
|
|
today = str(date.today())
|
2023-09-08 13:56:16 +00:00
|
|
|
look_for_file_64 = Path('dev.64xfc')
|
|
|
|
look_for_file_32 = Path('dev.32xfc')
|
|
|
|
look_for_file_arm = Path('dev.armxfc')
|
|
|
|
|
|
|
|
if look_for_file_64.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_64_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev64/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_64_xfce-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev64/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_32.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_32_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev32/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_32_xfce-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev32/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_arm.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_arm_xfce'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/devarm/xfce'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_arma_xfce-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/devarm/xfce'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
2023-09-05 14:38:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
def copy_devuan_gfb_based():
|
2023-09-08 13:56:16 +00:00
|
|
|
""" Copy the new ISO devuan base to its Nightly folder
|
2023-09-05 14:38:55 +00:00
|
|
|
Gnome Flashback
|
|
|
|
"""
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-08 13:56:16 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 06:48:53 +00:00
|
|
|
today = str(date.today())
|
2023-09-08 13:56:16 +00:00
|
|
|
look_for_file_64 = Path('dev.64gfb')
|
|
|
|
look_for_file_32 = Path('dev.32gfb')
|
|
|
|
look_for_file_arm = Path('dev.armgfb')
|
2023-09-05 14:38:55 +00:00
|
|
|
|
2023-09-08 13:56:16 +00:00
|
|
|
if look_for_file_64.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_64_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev64/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_64_gfb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev64/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_32.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_32_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev32/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_32-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev32/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_arm.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_arm_gfb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/devarm/gnome-flashback'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_arm_gfb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/devarm/gnome-flashback'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
2023-09-05 14:38:55 +00:00
|
|
|
|
|
|
|
def copy_devuan_opb_based():
|
2023-09-08 13:56:16 +00:00
|
|
|
""" Copy the new ISO devuan base to its Nightly folder
|
2023-09-05 14:38:55 +00:00
|
|
|
OpenBox
|
|
|
|
"""
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-08 13:56:16 +00:00
|
|
|
current_working_directory = os.listdir(".")
|
2023-07-11 06:48:53 +00:00
|
|
|
today = str(date.today())
|
2023-09-08 13:56:16 +00:00
|
|
|
look_for_file_64 = Path('dev.64opb')
|
|
|
|
look_for_file_32 = Path('dev.32opb')
|
|
|
|
look_for_file_arm = Path('dev.armopb')
|
|
|
|
|
|
|
|
if look_for_file_64.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_64_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev64/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_64_opb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev64/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_32.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_32_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/dev32/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_32_opb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/dev32/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
|
|
|
elif look_for_file_arm.is_file():
|
|
|
|
for f_v in current_working_directory:
|
|
|
|
if f_v.endswith('.iso'):
|
|
|
|
src_iso = f_v
|
|
|
|
rdes = ('PeppermintOS-devuan_arm_opb'
|
|
|
|
+ today +
|
|
|
|
'.iso'
|
|
|
|
)
|
|
|
|
des_iso = '/var/www/html/nightly/devarm/openbox'
|
|
|
|
os.rename(src_iso, rdes)
|
|
|
|
shutil.copy(rdes, des_iso)
|
|
|
|
if f_v.endswith('.checksum'):
|
|
|
|
src_sum = f_v
|
|
|
|
rdes_sum = 'PeppermintOS-devuan_arm_opb-sha512.checksum'
|
|
|
|
des_sum = '/var/www/html/nightly/devarm/openbox'
|
|
|
|
os.rename(src_sum, rdes_sum)
|
|
|
|
shutil.copy(rdes_sum, des_sum)
|
2023-07-11 06:48:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
def kill_old_iso():
|
|
|
|
""" Delete older ISOs"""
|
2023-10-19 04:52:08 +00:00
|
|
|
base_path = BASE_DESTINATION
|
2023-09-06 10:27:28 +00:00
|
|
|
arch_list = ['deb32/', 'deb64/', 'debarm/', 'dev32/', 'dev64/', 'devarm/']
|
|
|
|
de_list = ['gnome-flashback', 'openbox', 'xfce']
|
|
|
|
for archs in arch_list:
|
|
|
|
for desktops in de_list:
|
|
|
|
full_path = []
|
|
|
|
full_path.append(base_path + archs + desktops)
|
|
|
|
for working_paths in full_path:
|
|
|
|
N = 1
|
|
|
|
os.chdir(os.path.join(os.getcwd(), working_paths))
|
|
|
|
list_of_files = os.listdir()
|
|
|
|
current_time = time.time()
|
|
|
|
day = 86400
|
|
|
|
for fls in list_of_files:
|
|
|
|
file_location = os.path.join(os.getcwd(), fls)
|
|
|
|
file_time = os.stat(file_location).st_mtime
|
|
|
|
if file_time < current_time - day*N:
|
|
|
|
print(f" Delete : {fls}")
|
|
|
|
os.remove(file_location)
|