diff --git a/PepDeb32/BldHelper-release.sh-backup b/PepDeb32/BldHelper-release.sh-backup deleted file mode 100755 index b60a884..0000000 --- a/PepDeb32/BldHelper-release.sh-backup +++ /dev/null @@ -1,86 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=i386 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 - - diff --git a/PepDeb32/BldHelper.py b/PepDeb32/BldHelper.py new file mode 100755 index 0000000..8d38f53 --- /dev/null +++ b/PepDeb32/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDeb32/BldHelper-release.sh b/PepDeb32/BldHelper.sh similarity index 99% rename from PepDeb32/BldHelper-release.sh rename to PepDeb32/BldHelper.sh index ec63d57..fcc4ba4 100755 --- a/PepDeb32/BldHelper-release.sh +++ b/PepDeb32/BldHelper.sh @@ -8,8 +8,6 @@ # License: GPL-3.0-or-later ################################################################################ -#!/bin/bash - # Set environment variables PREFIX=PepMini SUFFIX=deb-i386 diff --git a/PepDeb64/BldHelper-release.sh b/PepDeb64/BldHelper-release.sh deleted file mode 100755 index aee48bf..0000000 --- a/PepDeb64/BldHelper-release.sh +++ /dev/null @@ -1,84 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=amd64 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 diff --git a/PepDeb64/BldHelper.py b/PepDeb64/BldHelper.py new file mode 100755 index 0000000..81def5d --- /dev/null +++ b/PepDeb64/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDeb64/BldHelper.sh b/PepDeb64/BldHelper.sh new file mode 100755 index 0000000..96b3be8 --- /dev/null +++ b/PepDeb64/BldHelper.sh @@ -0,0 +1,53 @@ + #!/bin/bash + +################################################################################ +# Title: Bldhelper.sh +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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 + + diff --git a/PepDeb_arm64/BldHelper-release.sh b/PepDeb_arm64/BldHelper-release.sh deleted file mode 100755 index a8c2ac3..0000000 --- a/PepDeb_arm64/BldHelper-release.sh +++ /dev/null @@ -1,84 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=deb-arm64 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 - diff --git a/PepDeb_arm64/BldHelper.py b/PepDeb_arm64/BldHelper.py new file mode 100755 index 0000000..cc529ad --- /dev/null +++ b/PepDeb_arm64/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDeb_arm64/BldHelper.sh b/PepDeb_arm64/BldHelper.sh new file mode 100755 index 0000000..b0c55a8 --- /dev/null +++ b/PepDeb_arm64/BldHelper.sh @@ -0,0 +1,51 @@ + #!/bin/bash + +################################################################################ +# Title: Bldhelper.sh +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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 diff --git a/PepDev32/BldHelper-release.sh b/PepDev32/BldHelper-release.sh deleted file mode 100755 index 08a35ef..0000000 --- a/PepDev32/BldHelper-release.sh +++ /dev/null @@ -1,84 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=dev-i386 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 - diff --git a/PepDev32/BldHelper.py b/PepDev32/BldHelper.py new file mode 100755 index 0000000..cd97bc2 --- /dev/null +++ b/PepDev32/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDev32/BldHelper.sh b/PepDev32/BldHelper.sh new file mode 100755 index 0000000..a40a1dc --- /dev/null +++ b/PepDev32/BldHelper.sh @@ -0,0 +1,51 @@ + #!/bin/bash + +################################################################################ +# Title: Bldhelper.sh +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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 diff --git a/PepDev64/BldHelper-release.sh b/PepDev64/BldHelper-release.sh deleted file mode 100755 index 266315a..0000000 --- a/PepDev64/BldHelper-release.sh +++ /dev/null @@ -1,84 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=dev-amd64 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 - diff --git a/PepDev64/BldHelper.py b/PepDev64/BldHelper.py new file mode 100755 index 0000000..f1fd22c --- /dev/null +++ b/PepDev64/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDev64/BldHelper.sh b/PepDev64/BldHelper.sh new file mode 100755 index 0000000..e40cbbc --- /dev/null +++ b/PepDev64/BldHelper.sh @@ -0,0 +1,51 @@ + #!/bin/bash + +################################################################################ +# Title: Bldhelper.sh +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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 \ No newline at end of file diff --git a/PepDev_arm64/BldHelper-release.sh b/PepDev_arm64/BldHelper-release.sh deleted file mode 100755 index 90cefd6..0000000 --- a/PepDev_arm64/BldHelper-release.sh +++ /dev/null @@ -1,84 +0,0 @@ - #!/bin/bash - -################################################################################ -# Title: Bldhelper.sh -# Description: Script to build PeppermintOS ISO image -# Author: PeppermintOS Team -# 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 only removes 2 files . -SUFFIX=dev-arm64 # Also used by . 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 . -LOCATION=/var/www/html/nightly/PepMini/${BUILD} # Tells 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 - -### -# 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 - -### - -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 - diff --git a/PepDev_arm64/BldHelper.py b/PepDev_arm64/BldHelper.py new file mode 100755 index 0000000..5ca8627 --- /dev/null +++ b/PepDev_arm64/BldHelper.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +################################################################################ +# Title: Bldhelper.py +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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") + diff --git a/PepDev_arm64/BldHelper.sh b/PepDev_arm64/BldHelper.sh new file mode 100755 index 0000000..525ea14 --- /dev/null +++ b/PepDev_arm64/BldHelper.sh @@ -0,0 +1,51 @@ + #!/bin/bash + +################################################################################ +# Title: Bldhelper.sh +# Description: Script to build PeppermintOS ISO image +# Author: PeppermintOS Team +# 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