new commit
This commit is contained in:
parent
fc2fe25ad3
commit
1b3e5c9179
|
@ -32,41 +32,49 @@ cd ${WorkingDir}
|
|||
# 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
|
||||
do
|
||||
((++_break))
|
||||
if [ $_break -gt $_wait ]
|
||||
then
|
||||
echo "Timeout waiting for ISO to appear"
|
||||
break
|
||||
fi
|
||||
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} ${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
|
||||
#rm -f ${LOCATION}/${FileName}*.torrent
|
||||
### <HouseKeeping>
|
||||
# Remove the previous files in ${LOCATION} .
|
||||
rm -f ${LOCATION}/${FileName}*.iso
|
||||
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||
#rm -f ${LOCATION}/${FileName}*.torrent
|
||||
|
||||
#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}*
|
||||
|
||||
# Clean the fusato folder
|
||||
lb clean &
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
|
||||
# Move the log file to the log directory.
|
||||
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||
mv ${OutFile} ${LogFile}
|
||||
### </HouseKeeping>
|
||||
|
||||
### </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}
|
||||
fi
|
||||
|
||||
rm -r *
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue