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}" echo "Creating Makefile... ${BOLD}START${OFF}"
cd $JHALFSDIR/${PROGNAME}-commands cd "$JHALFSDIR/$COMMANDS"
# Start with empty files # Start with empty files
>$MKFILE >$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 do that, configure jhalfs activating any option you want included, but do not
select "Run the Makefile" option. 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 (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. /mnt/build_dir/jhalfs/lfs-commands) you will find the default build scripts.

View file

@ -46,7 +46,7 @@ extract_commands() { #
cd $JHALFSDIR cd $JHALFSDIR
# Clean # Clean
rm -rf ${PROGNAME}-commands rm -rf "$COMMANDS"
# Extract the commands # Extract the commands
echo -n "Extracting commands for" echo -n "Extracting commands for"
@ -106,12 +106,12 @@ extract_commands() { #
--stringparam local "$LOCAL" \ --stringparam local "$LOCAL" \
--stringparam log-level "$LOG_LEVEL" \ --stringparam log-level "$LOG_LEVEL" \
--stringparam script-root "$SCRIPT_ROOT" \ --stringparam script-root "$SCRIPT_ROOT" \
--output ./${PROGNAME}-commands/ \ --output "./${COMMANDS}/" \
$XSL \ $XSL \
prbook.xml >> $LOGDIR/$LOG 2>&1 prbook.xml >> $LOGDIR/$LOG 2>&1
# Remove flags requesting user action in some cases. Much easier here than # Remove flags requesting user action in some cases. Much easier here than
# in the stylesheet... # 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... " *) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
exit 1 ;; exit 1 ;;
@ -120,7 +120,7 @@ extract_commands() { #
echo "done" echo "done"
# Make the scripts executable. # 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 # Create the packages file. We need it for proper Makefile creation
# lfs does not use this anymore, but this is taken care in the # 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) BASEDIR = \$(MOUNT_PT)
SRCSDIR = \$(BASEDIR)/sources SRCSDIR = \$(BASEDIR)/sources
CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$COMMANDS
LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$LOGDIRBASE LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$LOGDIRBASE
TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$TESTLOGDIRBASE TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands crCMDSDIR = /\$(SCRIPT_ROOT)/$COMMANDS
crLOGDIR = /\$(SCRIPT_ROOT)/$LOGDIRBASE crLOGDIR = /\$(SCRIPT_ROOT)/$LOGDIRBASE
crTESTLOGDIR = /\$(SCRIPT_ROOT)/$TESTLOGDIRBASE crTESTLOGDIR = /\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
@ -215,7 +215,7 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
( (
cat << EOF cat << EOF
@export LFS=\$(MOUNT_PT) && \\ @export LFS=\$(MOUNT_PT) && \\
${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 $COMMANDS/`dirname $file`/\$@ >>logs/\$@$version 2>&1
EOF EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
} }

1
jhalfs
View file

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