update BldHelper script and add python3 version
This commit is contained in:
parent
26ab619301
commit
a7596c5b7f
|
@ -1,86 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=i386 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDeb32 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDeb32 #* If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((_break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "deb-i386"
|
||||
BUILD = "PepDeb32"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDeb32"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -8,8 +8,6 @@
|
|||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=deb-i386
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=amd64 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDeb64 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDeb64 # If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((_break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "deb-amd64"
|
||||
BUILD = "PepDeb64"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDeb64"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=deb-amd64
|
||||
BUILD=PepDeb64
|
||||
TODAY=$(date -u +"%Y-%m-%d")
|
||||
FileName="${PREFIX}-${SUFFIX}"
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
|
||||
LogDir=/var/log/Live-Build
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDeb64
|
||||
|
||||
# Execute the ISO building script
|
||||
cd ${WorkingDir}
|
||||
./pepbld.sh
|
||||
|
||||
# Move and rename the ISO file
|
||||
cd fusato
|
||||
mv *.iso ${FileName}-${TODAY}.iso
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
mkdir -p ${LOCATION}
|
||||
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
||||
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
if [ -f /tmp/${PREFIX}${SUFFIX}.out ]; then
|
||||
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||
fi
|
||||
|
||||
# Clean the build folder
|
||||
lb clean
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
cd ..
|
||||
rm -rf fusato
|
||||
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=deb-arm64 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDeb_arm64 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDeb_arm64 # If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((_break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "deb-arm64"
|
||||
BUILD = "PepDeb_arm64"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDeb_arm64"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=deb-arm64
|
||||
BUILD=PepDeb_arm64
|
||||
TODAY=$(date -u +"%Y-%m-%d")
|
||||
FileName="${PREFIX}-${SUFFIX}"
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
|
||||
LogDir=/var/log/Live-Build
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDeb_arm64
|
||||
|
||||
# Execute the ISO building script
|
||||
cd ${WorkingDir}
|
||||
./pepbld.sh
|
||||
|
||||
# Move and rename the ISO file
|
||||
cd fusato
|
||||
mv *.iso ${FileName}-${TODAY}.iso
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
mkdir -p ${LOCATION}
|
||||
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
||||
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
if [ -f /tmp/${PREFIX}${SUFFIX}.out ]; then
|
||||
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||
fi
|
||||
|
||||
# Clean the build folder
|
||||
lb clean
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
cd ..
|
||||
rm -rf fusato
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=dev-i386 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDev32 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev32 #* If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "dev-i386"
|
||||
BUILD = "PepDev32"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDev32"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=dev-i386
|
||||
BUILD=PepDev32
|
||||
TODAY=$(date -u +"%Y-%m-%d")
|
||||
FileName="${PREFIX}-${SUFFIX}"
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
|
||||
LogDir=/var/log/Live-Build
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev32
|
||||
|
||||
# Execute the ISO building script
|
||||
cd ${WorkingDir}
|
||||
./pepbld.sh
|
||||
|
||||
# Move and rename the ISO file
|
||||
cd fusato
|
||||
mv *.iso ${FileName}-${TODAY}.iso
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
mkdir -p ${LOCATION}
|
||||
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
||||
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
if [ -f /tmp/${PREFIX}${SUFFIX}.out ]; then
|
||||
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||
fi
|
||||
|
||||
# Clean the build folder
|
||||
lb clean
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
cd ..
|
||||
rm -rf fusato
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=dev-amd64 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDev64 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev64 #* If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((_break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "dev-amd64"
|
||||
BUILD = "PepDev64"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDev64"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=dev-amd64
|
||||
BUILD=PepDev64
|
||||
TODAY=$(date -u +"%Y-%m-%d")
|
||||
FileName="${PREFIX}-${SUFFIX}"
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
|
||||
LogDir=/var/log/Live-Build
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev64
|
||||
|
||||
# Execute the ISO building script
|
||||
cd ${WorkingDir}
|
||||
./pepbld.sh
|
||||
|
||||
# Move and rename the ISO file
|
||||
cd fusato
|
||||
mv *.iso ${FileName}-${TODAY}.iso
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
mkdir -p ${LOCATION}
|
||||
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
||||
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
if [ -f /tmp/${PREFIX}${SUFFIX}.out ]; then
|
||||
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||
fi
|
||||
|
||||
# Clean the build folder
|
||||
lb clean
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
cd ..
|
||||
rm -rf fusato
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
### ## # Set build working variables HERE # ## ###
|
||||
|
||||
PREFIX=PepMini # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||
SUFFIX=dev-arm64 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||
BUILD=PepDev_arm64 # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||
|
||||
##################################################
|
||||
### ## # Make NO Edits Below This Line !! # ## ###
|
||||
##################################################
|
||||
|
||||
TODAY=$(date -u +"%Y-%m-%d") && export TODAY # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev_arm64 # If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||
OutFile="/tmp/${PREFIX}${SUFFIX}.out"
|
||||
LogFile="${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log"
|
||||
_cache="./cache"
|
||||
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||
cd ${WorkingDir}
|
||||
|
||||
# Run the build script - expect 50 minutes, allow 60.
|
||||
./pepbld.sh 2>&1 | tee -a ${OutFile}
|
||||
|
||||
# Timing matters, don't destroy the old one without a replacement.
|
||||
# Check for the ISO to appear and wait for things to settle.
|
||||
until [ -e fusato/*.iso ]
|
||||
do ((_break))
|
||||
[ $_break -gt $_wait ] && break || sleep 1
|
||||
done
|
||||
|
||||
if [ ${_break} -lt ${_wait} ] ; then
|
||||
|
||||
mv fusato/*.iso fusato/${FileName}.iso
|
||||
|
||||
# Make the checksum file.
|
||||
cd fusato
|
||||
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
#mv $(FileName}* ${LOCATION}/
|
||||
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||
touch ${LOCATION}/${FileName}*
|
||||
|
||||
lb clean &
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Remove old packages from the cache directory
|
||||
for i in $(grep "Del " ${LogFile} | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" )
|
||||
do for j in $_cache/packages.*/${i}*.deb
|
||||
do [ -e $j ] && rm $j
|
||||
done
|
||||
done
|
||||
|
||||
### </HouseKeeping>
|
||||
|
||||
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
|
||||
mv ${OutFile} ${LogFile}
|
||||
fi
|
||||
|
||||
# Remove fusato folder content
|
||||
rm -r cache
|
||||
rm -r config
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.py
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
# Set environment variables
|
||||
PREFIX = "PepMini"
|
||||
SUFFIX = "dev-arm64"
|
||||
BUILD = "PepDev_arm64"
|
||||
TODAY = datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||
FileName = f"{PREFIX}-{SUFFIX}"
|
||||
LOCATION = "/var/www/html/nightly/PepMini/" + BUILD
|
||||
LogDir = "/var/log/Live-Build"
|
||||
WorkingDir = "/home/pepadmin/PepMini/PepDev_arm64"
|
||||
|
||||
# Execute the ISO building script
|
||||
os.chdir(WorkingDir)
|
||||
os.system("./pepbld.sh")
|
||||
|
||||
# Move and rename the ISO file
|
||||
os.chdir("fusato")
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
shutil.move(iso_files[0], f"{FileName}-{TODAY}.iso")
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
iso_files = [f for f in os.listdir() if f.endswith(".iso")]
|
||||
if len(iso_files) > 0:
|
||||
iso_file = iso_files[0]
|
||||
checksum_file = f"{FileName}-{TODAY}-sha512.checksum"
|
||||
os.system(f"sha512sum {iso_file} > {checksum_file}")
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
os.chdir(LOCATION)
|
||||
old_files = [f for f in os.listdir() if f.startswith(FileName)]
|
||||
for old_file in old_files:
|
||||
os.remove(old_file)
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
os.chdir(os.path.join(WorkingDir, "fusato"))
|
||||
if os.path.exists(LOCATION):
|
||||
shutil.move(f"{FileName}-{TODAY}.iso", LOCATION)
|
||||
shutil.move(f"{FileName}-{TODAY}-sha512.checksum", LOCATION)
|
||||
else:
|
||||
print(f"Location {LOCATION} does not exist")
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
log_file = f"/tmp/{PREFIX}{SUFFIX}.out"
|
||||
if os.path.exists(log_file):
|
||||
shutil.move(log_file, f"{LogDir}/{PREFIX}-{SUFFIX}-{BUILD}.log")
|
||||
|
||||
# Clean the build folder
|
||||
os.system("lb clean")
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
os.chdir(WorkingDir)
|
||||
shutil.rmtree("fusato")
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# Title: Bldhelper.sh
|
||||
# Description: Script to build PeppermintOS ISO image
|
||||
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
||||
# Date: May 10, 2023
|
||||
# License: GPL-3.0-or-later
|
||||
################################################################################
|
||||
|
||||
# Set environment variables
|
||||
PREFIX=PepMini
|
||||
SUFFIX=dev-arm64
|
||||
BUILD=PepDev_arm64
|
||||
TODAY=$(date -u +"%Y-%m-%d")
|
||||
FileName="${PREFIX}-${SUFFIX}"
|
||||
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
|
||||
LogDir=/var/log/Live-Build
|
||||
WorkingDir=/home/pepadmin/PepMini/PepDev_arm64
|
||||
|
||||
# Execute the ISO building script
|
||||
cd ${WorkingDir}
|
||||
./pepbld.sh
|
||||
|
||||
# Move and rename the ISO file
|
||||
cd fusato
|
||||
mv *.iso ${FileName}-${TODAY}.iso
|
||||
|
||||
# Create the checksum file for the ISO
|
||||
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
||||
|
||||
# Remove old ISO and checksum files from the desired location
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
|
||||
# Move the ISO and checksum files to the desired location
|
||||
mkdir -p ${LOCATION}
|
||||
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
||||
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
||||
|
||||
# Move the log file to the log directory (if it exists)
|
||||
if [ -f /tmp/${PREFIX}${SUFFIX}.out ]; then
|
||||
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||
fi
|
||||
|
||||
# Clean the build folder
|
||||
lb clean
|
||||
|
||||
# Remove the "fusato" directory and its contents
|
||||
cd ..
|
||||
rm -rf fusato
|
Loading…
Reference in New Issue