#!/bin/bash
HTMLDIR="/var/www/voidbuilds.xyz/public"
FILENAME="BUILD_STATUS.html"
TOTAL="7"
echo "0/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: Base" >> ${HTMLDIR}/${FILENAME}
echo "Building: Base Image..."
sleep 1
./base-x64.sh
echo "1/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: Cinnamon" >> ${HTMLDIR}/${FILENAME}
echo " Building: Cinnamon Image..."
sleep 1
./cinnamon-x64.sh
echo "2/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
#echo "Building Image: GNOME" >> ${HTMLDIR}/${FILENAME}
#echo " Building: Gnome Image..."
#sleep 1
#./gnome-x64.sh
echo "Building Image: i3" >> ${HTMLDIR}/${FILENAME}
echo "Building: i3 image..."
sleep 1
./i3-x64.sh
echo "3/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
#echo "Building Image: KDE" >> ${HTMLDIR}/${FILENAME}
#echo "Building: Kde image..."
#sleep 1
#./kde-x64.sh
echo "Building Image: LXDE" >> ${HTMLDIR}/${FILENAME}
echo "Building: Lxde Image..."
sleep 1
./lxde-x64.sh
echo "4/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: LXQT" >> ${HTMLDIR}/${FILENAME}
echo "Building: Lxqt Image..."
sleep 1
./lxqt-x64.sh
echo "5/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: MATE" >> ${HTMLDIR}/${FILENAME}
echo "Building: Mate Image..."
sleep 1
./mate-x64.sh
echo "6/${TOTAL} completed at $(date +%T)" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: XFCE" >> ${HTMLDIR}/${FILENAME}
echo "Building: Xfce Image..."
sleep 1
./xfce-x64.sh
echo "7/${TOTAL} completed at $(date +%T) " >> ${HTMLDIR}/${FILENAME}
if [ ! -f sha256sums.txt ];then
echo "sha manifest does not exist!"
echo "Done!"
exit 0;
fi
echo "Signing checksum file" >> ${HTMLDIR}/${FILENAME}
./sign-file.sh -f sha256sums.txt
./mv-images.sh
echo "Done!"