Replace $PROGNAME-commands with $COMMANDS

This allows to remove some references to PROGNAME
This commit is contained in:
Pierre Labastie 2022-03-30 14:49:43 +02:00
parent 2fd624d8f6
commit 2bd2fb81d0
5 changed files with 10 additions and 9 deletions

View file

@ -228,7 +228,7 @@ build_Makefile() { #
echo "Creating Makefile... ${BOLD}START${OFF}"
cd $JHALFSDIR/${PROGNAME}-commands
cd "$JHALFSDIR/$COMMANDS"
# Start with empty files
>$MKFILE

View file

@ -34,7 +34,7 @@ able to boot and run. Each of those areas are handled in a different way.
do that, configure jhalfs activating any option you want included, but do not
select "Run the Makefile" option.
Under the ${BUILD_DIR}/${SCRIPT_ROOT}/${PROGNAME}-commands directory
Under the ${BUILD_DIR}/${SCRIPT_ROOT}/$COMMANDS directory
(using the defaults values to do an LFS build, that directory name is
/mnt/build_dir/jhalfs/lfs-commands) you will find the default build scripts.

View file

@ -46,7 +46,7 @@ extract_commands() { #
cd $JHALFSDIR
# Clean
rm -rf ${PROGNAME}-commands
rm -rf "$COMMANDS"
# Extract the commands
echo -n "Extracting commands for"
@ -106,12 +106,12 @@ extract_commands() { #
--stringparam local "$LOCAL" \
--stringparam log-level "$LOG_LEVEL" \
--stringparam script-root "$SCRIPT_ROOT" \
--output ./${PROGNAME}-commands/ \
--output "./${COMMANDS}/" \
$XSL \
prbook.xml >> $LOGDIR/$LOG 2>&1
# Remove flags requesting user action in some cases. Much easier here than
# in the stylesheet...
sed -i 's/-iv /-v /' ./${PROGNAME}-commands/chapter??/*kernel*
sed -i 's/-iv /-v /' "./${COMMANDS}/"chapter??/*kernel*
;;
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
exit 1 ;;
@ -120,7 +120,7 @@ extract_commands() { #
echo "done"
# Make the scripts executable.
chmod -R +x $JHALFSDIR/${PROGNAME}-commands
chmod -R +x "$JHALFSDIR/${COMMANDS}"
# Create the packages file. We need it for proper Makefile creation
# lfs does not use this anymore, but this is taken care in the

View file

@ -25,11 +25,11 @@ SCRIPT_ROOT = $SCRIPT_ROOT
BASEDIR = \$(MOUNT_PT)
SRCSDIR = \$(BASEDIR)/sources
CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$COMMANDS
LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$LOGDIRBASE
TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands
crCMDSDIR = /\$(SCRIPT_ROOT)/$COMMANDS
crLOGDIR = /\$(SCRIPT_ROOT)/$LOGDIRBASE
crTESTLOGDIR = /\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
@ -215,7 +215,7 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
(
cat << EOF
@export LFS=\$(MOUNT_PT) && \\
${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1
$COMMANDS/`dirname $file`/\$@ >>logs/\$@$version 2>&1
EOF
) >> $MKFILE.tmp
}

1
jhalfs
View file

@ -200,6 +200,7 @@ BOOK=${BOOK:=$JHALFSDIR/book-source}
# shellcheck disable=SC2034
declare -r REPO=git://git.linuxfromscratch.org/lfs.git
declare -r LOG=000-masterscript.log
declare -r COMMANDS=lfs-commands
# Set true internal variables
COMMON_DIR="common"