Changed upper case variable names to lower case in main section build file

This commit is contained in:
SMLinux 2022-02-14 10:26:26 +05:30
parent bf6282a1f7
commit ed13a09bcf

View file

@ -7,10 +7,10 @@
# Modified and trimmed extensively for use with SMLinux
# The default list of GSB sections, in the order they should be processed.
SECTIONS="${SECTIONS:- base xorg gtk extra net xfce }"
sections="${sections:- base xorg gtk extra net xfce }"
# Generate HTML and TXT reports. Use 1 to enable and 0 to disable.
SM_GENERATEREPORTS=0
generatereports=0
# Usage.
function usage() {
@ -30,11 +30,11 @@ export -f usage
function list_packages() {
echo "The sections and packages below (listed in processing order) will be built."
for SECTION in $SECTIONS
for section in $sections
do
echo
echo " $SECTION:"
echo "$( $SECTION/ssb.$SECTION.SMBuild --list | cut -d$'\n' -f2- )"
echo " $section:"
echo "$( $section/ssb.$section.SMBuild --list | cut -d$'\n' -f2- )"
done
}
@ -61,22 +61,22 @@ cd $( cd ${BASH_SOURCE%/*} ; pwd )
# Setup the environment
# Use custom build variables file
SM_PARENTTMP="/tmp"
PKGDEST=${PKGDEST:-$SM_PARENTTMP/sml/packages}
LOGSDIR=${LOGSDIR:-$SM_PARENTTMP/sml/sml-buildlogs}
SM_AUTOBUILD=1
ARCH="$HOSTTYPE"
export PKGDEST LOGSDIR SM_AUTOBUILD ARCH SM_PARENTTMP
parenttmp="/tmp"
pkgdest=${pkgdest:-$parenttmp/sml/packages}
logsdir=${logsdir:-$parenttmp/sml/sml-buildlogs}
autobuild=1
arch="$HOSTTYPE"
export pkgdest logsdir autobuild arch parenttmp
# Temporary space, package and log file storage.
mkdir -p $PKGDEST $LOGSDIR
mkdir -p $pkgdest $logsdir
SM_AUTOBUILDTEMP="$(mktemp $SM_PARENTTMP/SMBUILD.XXXXXX)"
export SM_AUTOBUILDTEMP
autobuildtemp="$(mktemp $parenttmp/SMBUILD.XXXXXX)"
export autobuildtemp
function autointerruptsummary() {
cat "$SM_AUTOBUILDTEMP"
rm "$SM_AUTOBUILDTEMP"
cat "$autobuildtemp"
rm "$autobuildtemp"
}
trap "autointerruptsummary" INT
@ -105,21 +105,21 @@ done
echo "* Building SMLinux - this may take a while..."
echo "*********************************************************************"
for SECTION in $SECTIONS
for section in $sections
do
( cd $SECTION && ./ssb.$SECTION.SMBuild 2>&1 ) || {
( cd $section && ./ssb.$section.SMBuild 2>&1 ) || {
echo
echo "*********************************************************************"
echo "* Build aborted: error building in section '$SECTION'."
echo "* Check the build logs in '$LOGSDIR' and try again."
echo "* Build aborted: error building in section '$section'."
echo "* Check the build logs in '$logsdir' and try again."
echo "*********************************************************************"
echo "* Build failed after $( runtime $SECONDS )."
echo "*********************************************************************"
rm -f "$SM_AUTOBUILDTEMP"
rm -f "$autobuildtemp"
exit 1
}
# Generate HTML tables
if [ "$SM_GENERATEREPORTS" = "1" ] && [ -x /bin/genreports ] ; then
if [ "$generatereports" = "1" ] && [ -x /bin/genreports ] ; then
/bin/genreports $SECTION 1.0 aarch64
fi
done
@ -127,13 +127,13 @@ done
echo
echo "*********************************************************************"
echo "* Successfully finished building SMLinux!"
echo "* SMLinux packages are in '$PKGDEST/$ARCH'."
echo "* Build logs are in '$LOGSDIR'."
echo "* SMLinux packages are in '$pkgdest/$arch'."
echo "* Build logs are in '$logsdir'."
echo "*********************************************************************"
echo "* Complete build time was $( runtime $SECONDS )."
echo "*********************************************************************"
rm -f "$SM_AUTOBUILDTEMP"
) 2>&1 | tee $LOGSDIR/$( basename $0 .SMBuild )-$ARCH.log.txt
rm -f "$autobuildtemp"
) 2>&1 | tee $logsdir/$( basename $0 .SMBuild )-$arch.log.txt
# Return the exit status from the sub-shell, not the tee command.
exit ${PIPESTATUS[0]}