2023-06-14 11:07:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Title: Bldhelper.sh
|
|
|
|
# Description: Script to build AçorOS ISO image
|
|
|
|
# Author: PeppermintOS Team <peppermintosteam@proton.me>
|
|
|
|
# Date: May 10, 2023
|
|
|
|
# License: GPL-3.0-or-later
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Set environment variables
|
|
|
|
PREFIX=AcorOS-lxde
|
|
|
|
SUFFIX=i386
|
|
|
|
BUILD=lxde
|
|
|
|
TODAY=$(date -u +"%Y-%m-%d")
|
|
|
|
FileName="${PREFIX}-${SUFFIX}"
|
|
|
|
LOCATION=/var/www/html/nightly/AcorOS/${BUILD}
|
|
|
|
LogDir=/var/log/Live-Build
|
2023-06-16 14:37:45 +00:00
|
|
|
WorkingDir=/home/pepadmin/build-configs/lxde32
|
2023-06-14 11:07:50 +00:00
|
|
|
|
|
|
|
# Execute the ISO building script
|
|
|
|
cd ${WorkingDir}
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
# Move and rename the ISO file
|
2023-06-14 14:05:02 +00:00
|
|
|
cd build
|
2023-06-14 11:07:50 +00:00
|
|
|
mv *.iso ${FileName}-${TODAY}.iso
|
|
|
|
|
|
|
|
# Create the checksum file for the ISO
|
|
|
|
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
|
|
|
|
|
|
|
|
# Remove old ISO and checksum files from the desired location
|
|
|
|
rm -f ${LOCATION}/${FileName}*.iso
|
|
|
|
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
|
|
|
|
|
|
|
# Move the ISO and checksum files to the desired location
|
|
|
|
mkdir -p ${LOCATION}
|
|
|
|
mv ${FileName}-${TODAY}.iso ${LOCATION}
|
|
|
|
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Clean the build folder
|
|
|
|
lb clean
|
|
|
|
|
2023-06-14 14:05:02 +00:00
|
|
|
# Remove the "build" directory and its contents
|
2023-06-14 11:07:50 +00:00
|
|
|
cd ..
|
2023-06-14 14:05:02 +00:00
|
|
|
rm -rf build
|
2023-06-14 11:07:50 +00:00
|
|
|
|