jhalfs: reorder actions: install lfs before custom tools

and blfs
This commit is contained in:
Pierre Labastie 2017-08-09 13:51:40 +00:00
parent 340c27e8ae
commit 200fbdee76

36
jhalfs
View file

@ -363,18 +363,19 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
if [[ ! -d $BUILDDIR/sources ]]; then if [[ ! -d $BUILDDIR/sources ]]; then
mkdir -p $BUILDDIR/sources mkdir -p $BUILDDIR/sources
fi fi
#
# Create the log directory # Create the log directory
if [[ ! -d $LOGDIR ]]; then if [[ ! -d $LOGDIR ]]; then
mkdir $LOGDIR mkdir $LOGDIR
fi fi
>$LOGDIR/$LOG >$LOGDIR/$LOG
#
# Copy common helper files # Copy common helper files
cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/ cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
# Copy needed stylesheets # Copy needed stylesheets
cp $COMMON_DIR/{packages.xsl,chroot.xsl} $JHALFSDIR/ cp $COMMON_DIR/{packages.xsl,chroot.xsl} $JHALFSDIR/
#
# Fix the XSL book parser # Fix the XSL book parser
case $PROGNAME in case $PROGNAME in
clfs* ) sed 's,FAKEDIR,'${BOOK}/BOOK',' ${PACKAGE_DIR}/${XSL} > $JHALFSDIR/${XSL} ;; clfs* ) sed 's,FAKEDIR,'${BOOK}/BOOK',' ${PACKAGE_DIR}/${XSL} > $JHALFSDIR/${XSL} ;;
@ -382,23 +383,22 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
* ) ;; * ) ;;
esac esac
export XSL=$JHALFSDIR/${XSL} export XSL=$JHALFSDIR/${XSL}
#
# Copy packageManager.xml, if needed # Copy packageManager.xml, if needed
[[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] && { [[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] && {
cp $PKGMNGTDIR/packageManager.xml $JHALFSDIR/ cp $PKGMNGTDIR/packageManager.xml $JHALFSDIR/
cp $PKGMNGTDIR/packInstall.sh $JHALFSDIR/ cp $PKGMNGTDIR/packInstall.sh $JHALFSDIR/
} }
#
# Copy urls.xsl, if needed # Copy urls.xsl, if needed
[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/ [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/
#
# Create the test-log directory, if needed # Create the test-log directory, if needed
[[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR [[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
#
# Create the installed-files directory, if needed # Create the installed-files directory, if needed
[[ "$INSTALL_LOG" = "y" ]] && [[ ! -d $FILELOGDIR ]] && install -d -m 1777 $FILELOGDIR [[ "$INSTALL_LOG" = "y" ]] && [[ ! -d $FILELOGDIR ]] && install -d -m 1777 $FILELOGDIR
#
# Prepare report creation, if needed # Prepare report creation, if needed
if [[ "$REPORT" = "y" ]]; then if [[ "$REPORT" = "y" ]]; then
cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/ cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/
@ -406,35 +406,35 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
# This file will be used to create the REPORT header # This file will be used to create the REPORT header
validate_config > $JHALFSDIR/jhalfs.config validate_config > $JHALFSDIR/jhalfs.config
fi fi
#
# Copy optimize files, if needed # Copy optimize files, if needed
[[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/ [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
#
# Copy compare files, if needed # Copy compare files, if needed
if [[ "$COMPARE" = "y" ]]; then if [[ "$COMPARE" = "y" ]]; then
mkdir -p $JHALFSDIR/extras mkdir -p $JHALFSDIR/extras
cp extras/* $JHALFSDIR/extras cp extras/* $JHALFSDIR/extras
fi fi
#
# Download or updates the book source
get_book
extract_commands
echo "${SD_BORDER}${nl_}"
cd $CWD # the functions above change directory
# Copy custom tools config files, if requested # Copy custom tools config files, if requested
if [[ "${CUSTOM_TOOLS}" = "y" ]]; then if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
echo "Copying custom tool scripts to $JHALFSDIR" echo "Copying custom tool scripts to $JHALFSDIR"
mkdir -p $JHALFSDIR/custom-commands mkdir -p $JHALFSDIR/custom-commands
cp -f custom/config/* $JHALFSDIR/custom-commands cp -f custom/config/* $JHALFSDIR/custom-commands
fi fi
#
# Install blfs-tool, if requested. # Install blfs-tool, if requested.
if [[ "${BLFS_TOOL}" = "y" ]] ; then if [[ "${BLFS_TOOL}" = "y" ]] ; then
echo Installing BLFS book and tools echo Installing BLFS book and tools
install_blfs_tools 2>&1 | tee -a $LOGDIR/$LOG install_blfs_tools 2>&1 | tee -a $LOGDIR/$LOG
[[ ${PIPESTATUS[0]} != 0 ]] && exit 1 [[ ${PIPESTATUS[0]} != 0 ]] && exit 1
fi fi
#
# Download or updates the book source
get_book
extract_commands
echo "${SD_BORDER}${nl_}"
fi fi