diff --git a/PepDeb32/BldHelper-release.sh b/PepDeb32/BldHelper-release.sh index 83469d8..aa86ff4 100755 --- a/PepDeb32/BldHelper-release.sh +++ b/PepDeb32/BldHelper-release.sh @@ -8,6 +8,8 @@ # License: GPL-3.0-or-later ################################################################################ +#!/bin/bash + # Set environment variables PREFIX=PepMini SUFFIX=dev-i386 @@ -38,12 +40,14 @@ mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION} rm -f ${LOCATION}/${FileName}*.iso rm -f ${LOCATION}/${FileName}*-sha512.checksum -# Move the log file to the log directory -[ ! -e ${LogDir} ] && mkdir -p ${LogDir} -mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log +# 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 # Remove old files from the cache grep "Del " ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log | sort -u | cut -f2,3 -d" " | tr " " "_" | tr ":" "*" | tr "+" "*" | xargs -I {} find ./cache/packages.* -name "{}*.deb" -delete # Remove the "fusato" directory and its contents rm -rf fusato +