diff --git a/PepDeb32/BldHelper-release.sh b/PepDeb32/BldHelper-release.sh index 6cfa410..fe3f885 100755 --- a/PepDeb32/BldHelper-release.sh +++ b/PepDeb32/BldHelper-release.sh @@ -1,8 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# Author: PeppermintOS Team +# Date: May 10, 2023 +# License: GPL-3.0-or-later +################################################################################ ### ## # Set build working variables HERE # ## ### @@ -25,9 +29,8 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. -./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${OutFile} # Timing matters, don't destroy the old one without a replacement. # Check for the ISO to appear and wait for things to settle. @@ -42,14 +45,13 @@ mv fusato/*.iso fusato/${FileName}.iso # Make the checksum file. cd fusato -echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum +echo "# ${FileName}" > ${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 -#rm -f ${LOCATION}/${FileName}*.torrent +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum #mv $(FileName}* ${LOCATION}/ mv ${FileName}.iso ${LOCATION}/${FileName}.iso @@ -58,15 +60,22 @@ mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}* -# Clean the fusato folder -lb clean & +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 + diff --git a/PepDeb64/BldHelper-release.sh b/PepDeb64/BldHelper-release.sh index ea298e8..dac9d86 100755 --- a/PepDeb64/BldHelper-release.sh +++ b/PepDeb64/BldHelper-release.sh @@ -1,8 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# Author: PeppermintOS Team +# Date: May 10, 2023 +# License: GPL-3.0-or-later +################################################################################ ### ## # Set build working variables HERE # ## ### @@ -25,9 +29,8 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. - ./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${OutFile} # Timing matters, don't destroy the old one without a replacement. # Check for the ISO to appear and wait for things to settle. @@ -42,14 +45,13 @@ mv fusato/*.iso fusato/${FileName}.iso # Make the checksum file. cd fusato -echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum +echo "# ${FileName}" > ${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 -#rm -f ${LOCATION}/${FileName}*.torrent +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum #mv $(FileName}* ${LOCATION}/ mv ${FileName}.iso ${LOCATION}/${FileName}.iso @@ -58,13 +60,19 @@ mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}* -# Clean the fusato folder -lb clean & +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} diff --git a/PepDeb_arm64/BldHelper-release.sh b/PepDeb_arm64/BldHelper-release.sh index 437ef11..502f011 100755 --- a/PepDeb_arm64/BldHelper-release.sh +++ b/PepDeb_arm64/BldHelper-release.sh @@ -1,9 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. - +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# 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 . @@ -25,9 +28,8 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. - ./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${OutFile} # Timing matters, don't destroy the old one without a replacement. # Check for the ISO to appear and wait for things to settle. @@ -42,14 +44,13 @@ mv fusato/*.iso fusato/${FileName}.iso # Make the checksum file. cd fusato -echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum +echo "# ${FileName}" > ${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 -#rm -f ${LOCATION}/${FileName}*.torrent +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum #mv $(FileName}* ${LOCATION}/ mv ${FileName}.iso ${LOCATION}/${FileName}.iso @@ -58,13 +59,19 @@ mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}* -# Clean the fusato folder 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} diff --git a/PepDev32/BldHelper-release.sh b/PepDev32/BldHelper-release.sh index 0750428..d3701aa 100755 --- a/PepDev32/BldHelper-release.sh +++ b/PepDev32/BldHelper-release.sh @@ -1,9 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. - +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# 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 . @@ -25,56 +28,52 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. -./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${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)) - if [ $_break -gt $_wait ] - then - echo "Timeout waiting for ISO to appear" - break - fi - sleep 1 + do ((++_break)) + [ $_break -gt $_wait ] && break || sleep 1 done if [ ${_break} -lt ${_wait} ] ; then - mv fusato/*.iso fusato/${FileName}.iso +mv fusato/*.iso fusato/${FileName}.iso - # Make the checksum file. - cd fusato - echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum - sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum +# Make the checksum file. +cd fusato +echo "# ${FileName}" > ${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 - #rm -f ${LOCATION}/${FileName}*.torrent +### +# Remove the previous files in ${LOCATION} . +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum - #mv $(FileName}* ${LOCATION}/ - mv ${FileName}.iso ${LOCATION}/${FileName}.iso - mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum +#mv $(FileName}* ${LOCATION}/ +mv ${FileName}.iso ${LOCATION}/${FileName}.iso +mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum - # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* - touch ${LOCATION}/${FileName}* +# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* +touch ${LOCATION}/${FileName}* - # Move the log file to the log directory. - [ ! -e ${LogDir} ] && mkdir -p ${LogDir} - mv ${OutFile} ${LogFile} +lb clean & - ### +# Move the log file to the log directory. +[ ! -e ${LogDir} ] && mkdir -p ${LogDir} +mv ${OutFile} ${LogFile} -else - echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile} - 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 - -rm -r * - -exit 0 diff --git a/PepDev64/BldHelper-release.sh b/PepDev64/BldHelper-release.sh index 493c768..2a22096 100755 --- a/PepDev64/BldHelper-release.sh +++ b/PepDev64/BldHelper-release.sh @@ -1,9 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. - +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# 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 . @@ -25,9 +28,8 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. -./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${OutFile} # Timing matters, don't destroy the old one without a replacement. # Check for the ISO to appear and wait for things to settle. @@ -42,14 +44,13 @@ mv fusato/*.iso fusato/${FileName}.iso # Make the checksum file. cd fusato -echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum +echo "# ${FileName}" > ${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 -#rm -f ${LOCATION}/${FileName}*.torrent +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum #mv $(FileName}* ${LOCATION}/ mv ${FileName}.iso ${LOCATION}/${FileName}.iso @@ -58,13 +59,19 @@ mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}* -# Clean the fusato folder -lb clean & +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} diff --git a/PepDev_arm64/BldHelper-release.sh b/PepDev_arm64/BldHelper-release.sh index daa19a4..f279151 100755 --- a/PepDev_arm64/BldHelper-release.sh +++ b/PepDev_arm64/BldHelper-release.sh @@ -1,9 +1,12 @@ #!/bin/bash -# BldHelper-release.sh -# This script is meant to be run on the build server and expects to find and update itself from adjacent repos. -# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build. - +################################################################################ +# Title: Bldhelper.sh +# Description: Script para construir a imagem ISO do PeppermintOS +# 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 . @@ -25,9 +28,8 @@ _cache="./cache" _break=0 ; _wait=30 # Time (in seconds) to wait cd ${WorkingDir} -# Run the build script. - ./pepbld.sh 2>&1 | tee -a ${OutFile} - +# Run the build script - expect 50 minutes, allow 60. +./pepbld.sh 2>&1 | tee --append ${OutFile} # Timing matters, don't destroy the old one without a replacement. # Check for the ISO to appear and wait for things to settle. @@ -42,14 +44,13 @@ mv fusato/*.iso fusato/${FileName}.iso # Make the checksum file. cd fusato -echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum +echo "# ${FileName}" > ${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 -#rm -f ${LOCATION}/${FileName}*.torrent +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso +rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum #mv $(FileName}* ${LOCATION}/ mv ${FileName}.iso ${LOCATION}/${FileName}.iso @@ -58,15 +59,21 @@ mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}* -# Clean the fusato folder -lb clean & +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 \ No newline at end of file +fi