new commit

This commit is contained in:
Manuel 2023-05-11 11:10:34 +00:00
parent fc2fe25ad3
commit 1b3e5c9179
1 changed files with 34 additions and 26 deletions

View File

@ -32,41 +32,49 @@ cd ${WorkingDir}
# Timing matters, don't destroy the old one without a replacement. # Timing matters, don't destroy the old one without a replacement.
# Check for the ISO to appear and wait for things to settle. # Check for the ISO to appear and wait for things to settle.
until [ -e fusato/*.iso ] until [ -e fusato/*.iso ]
do ((++_break)) do
[ $_break -gt $_wait ] && break || sleep 1 ((++_break))
if [ $_break -gt $_wait ]
then
echo "Timeout waiting for ISO to appear"
break
fi
sleep 1
done done
if [ ${_break} -lt ${_wait} ] ; then if [ ${_break} -lt ${_wait} ] ; then
mv fusato/*.iso fusato/${FileName}.iso mv fusato/*.iso fusato/${FileName}.iso
# Make the checksum file. # Make the checksum file.
cd fusato cd fusato
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
### <HouseKeeping> ### <HouseKeeping>
# Remove the previous files in ${LOCATION} . # Remove the previous files in ${LOCATION} .
rm -f ${LOCATION}/${FileName}*.iso rm -f ${LOCATION}/${FileName}*.iso
rm -f ${LOCATION}/${FileName}*-sha512.checksum rm -f ${LOCATION}/${FileName}*-sha512.checksum
#rm -f ${LOCATION}/${FileName}*.torrent #rm -f ${LOCATION}/${FileName}*.torrent
#mv $(FileName}* ${LOCATION}/ #mv $(FileName}* ${LOCATION}/
mv ${FileName}.iso ${LOCATION}/${FileName}.iso mv ${FileName}.iso ${LOCATION}/${FileName}.iso
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}* # touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}*
touch ${LOCATION}/${FileName}* touch ${LOCATION}/${FileName}*
# Clean the fusato folder # Move the log file to the log directory.
lb clean & [ ! -e ${LogDir} ] && mkdir -p ${LogDir}
mv ${OutFile} ${LogFile}
# Move the log file to the log directory. ### </HouseKeeping>
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
mv ${OutFile} ${LogFile}
### </HouseKeeping> else
echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile}
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append ${OutFile} mv ${OutFile} ${LogFile}
mv ${OutFile} ${LogFile}
fi fi
rm -r *
exit 0