PepMiniiso/PepDev_arm64/BldHelper.sh

52 lines
1.5 KiB
Bash
Raw Normal View History

2023-03-28 12:48:46 +00:00
#!/bin/bash
2023-05-12 11:17:22 +00:00
################################################################################
# Title: Bldhelper.sh
2023-05-23 09:35:48 +00:00
# Description: Script to build PeppermintOS ISO image
2023-05-12 11:17:22 +00:00
# Author: PeppermintOS Team <peppermintosteam@proton.me>
# Date: May 10, 2023
# License: GPL-3.0-or-later
################################################################################
2023-03-28 12:48:46 +00:00
2023-05-23 10:45:50 +00:00
# Set environment variables
PREFIX=PepMini
SUFFIX=dev-arm64
BUILD=PepDev_arm64
2023-05-23 10:45:50 +00:00
TODAY=$(date -u +"%Y-%m-%d")
FileName="${PREFIX}-${SUFFIX}"
LOCATION=/var/www/html/nightly/PepMini/${BUILD}
LogDir=/var/log/Live-Build
WorkingDir=/home/pepadmin/PepMini/PepDev_arm64
2023-05-23 10:45:50 +00:00
# Execute the ISO building script
2023-03-28 13:28:50 +00:00
cd ${WorkingDir}
2023-05-23 10:45:50 +00:00
./pepbld.sh
2023-03-28 13:28:50 +00:00
2023-05-23 10:45:50 +00:00
# Move and rename the ISO file
cd fusato
mv *.iso ${FileName}-${TODAY}.iso
2023-03-28 12:48:46 +00:00
2023-05-23 10:45:50 +00:00
# Create the checksum file for the ISO
sha512sum ${FileName}-${TODAY}.iso > ${FileName}-${TODAY}-sha512.checksum
2023-03-28 12:48:46 +00:00
# Remove old ISO and checksum files from the desired location
rm -f ${LOCATION}/${FileName}*.iso
rm -f ${LOCATION}/${FileName}*-sha512.checksum
2023-05-23 10:45:50 +00:00
# Move the ISO and checksum files to the desired location
mkdir -p ${LOCATION}
mv ${FileName}-${TODAY}.iso ${LOCATION}
mv ${FileName}-${TODAY}-sha512.checksum ${LOCATION}
2023-03-28 12:48:46 +00:00
2023-05-23 13:51:00 +00:00
# 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
2023-05-23 09:08:34 +00:00
# Clean the build folder
lb clean
2023-05-23 10:45:50 +00:00
# Remove the "fusato" directory and its contents
cd ..
2023-05-23 10:45:50 +00:00
rm -rf fusato