Some text output and inline comments fixes.

Deleting temporal files used to create the packages and patches files.
This commit is contained in:
Manuel Canales Esparcia 2006-03-28 20:11:42 +00:00
parent 2db0869dbc
commit 60b56fd4e0

View file

@ -163,7 +163,7 @@ ${tab_}${tab_}${BOLD}${RED}W A R N I N G${OFF}
from a previous HLFS build. from a previous HLFS build.
Please format the partition mounted on \$BUILDDIR or set Please format the partition mounted on \$BUILDDIR or set
a different build directory before running jhahlfs. a different build directory before running jhalfs-X.
${OFF} ${OFF}
${DD_BORDER} ${DD_BORDER}
-EOF- -EOF-
@ -183,7 +183,7 @@ no_dl_client="\
echo \"Could not find a way to download the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} sources.\" >&2 echo \"Could not find a way to download the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} sources.\" >&2
echo \"Attempting to continue.\" >&2" echo \"Attempting to continue.\" >&2"
HEADER="# This file is automatically generated by jhalfs HEADER="# This file is automatically generated by jhalfs-X
# DO NOT EDIT THIS FILE MANUALLY # DO NOT EDIT THIS FILE MANUALLY
# #
# Generated on `date \"+%F %X %Z\"`" # Generated on `date \"+%F %X %Z\"`"
@ -208,7 +208,7 @@ EOF
#----------------------------------# #----------------------------------#
wrt_unpack() { # wrt_unpack() { # Unpack and set 'ROOT' var
#----------------------------------# #----------------------------------#
local FILE=$1 local FILE=$1
( (
@ -237,7 +237,7 @@ EOF
#=============================# #=============================#
wrt_unpack3() { # Unpack and set 'ROOT' var wrt_unpack3() { #
#=============================# #=============================#
local FILE=$1 local FILE=$1
( (
@ -265,7 +265,7 @@ EOF
#----------------------------------# #----------------------------------#
wrt_run_as_su() { # wrt_run_as_su() { # header to log file, execute script, footer to log file
#----------------------------------# #----------------------------------#
local this_script=$1 local this_script=$1
local file=$2 local file=$2
@ -280,7 +280,7 @@ EOF
#==================================# #==================================#
wrt_run_as_lfs() { # header to log file, execute script, footer to log file wrt_run_as_lfs() { #
#==================================# #==================================#
local this_script=$1 local this_script=$1
local file=$2 local file=$2
@ -310,7 +310,7 @@ EOF
#=============================# #=============================#
wrt_run_as_root2() { # Some scripts must be run as root.. wrt_run_as_root2() { # Some scripts must be run as root..
#=============================# #=============================#
local this_script=$1 local this_script=$1
local file=$2 local file=$2
@ -432,12 +432,12 @@ run_make() {
if [ "$RUNMAKE" = "1" ] ; then if [ "$RUNMAKE" = "1" ] ; then
# Test to make sure we're running the build as root # Test to make sure we're running the build as root
if [ "$UID" != "0" ] ; then if [ "$UID" != "0" ] ; then
echo "You must be logged in as root to successfully build LFS." echo "You must be logged in as root to successfully build the system."
exit 1 exit 1
fi fi
# Build the system # Build the system
if [ -e $MKFILE ] ; then if [ -e $MKFILE ] ; then
echo -ne "Building the LFS system...\n" echo -ne "Building the system...\n"
cd $JHALFSDIR && make -f ${PROGNAME}-Makefile cd $JHALFSDIR && make -f ${PROGNAME}-Makefile
echo -ne "done\n" echo -ne "done\n"
fi fi
@ -457,7 +457,7 @@ clean_builddir() {
fi fi
# Test to make sure that the build directory was populated by jhalfs # Test to make sure that the build directory was populated by jhalfs
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
echo "Looks like $BUILDDIR was not populated by a previous jhalfs run." echo "Looks like $BUILDDIR was not populated by a previous jhalfs-X run."
exit 1 exit 1
else else
# Clean the build directory # Clean the build directory
@ -491,7 +491,7 @@ get_book() {
*) echo "BOOK not defined in function <get_book>" *) echo "BOOK not defined in function <get_book>"
exit 1 ;; exit 1 ;;
esac esac
# Grab a fresh LFS book if it's missing, otherwise, update it from the # Grab a fresh book if it's missing, otherwise, update it from the
# repo. If we've already extracted the commands, move on to getting the # repo. If we've already extracted the commands, move on to getting the
# sources. # sources.
if [ -d ${PROGNAME}-$LFSVRS ] ; then if [ -d ${PROGNAME}-$LFSVRS ] ; then
@ -512,11 +512,11 @@ get_book() {
fi fi
else else
case $LFSVRS in case $LFSVRS in
development) development)
svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;; svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
alphabetical) alphabetical)
svn co $SVN/${svn_root}/branches/$LFSVRS/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;; svn co $SVN/${svn_root}/branches/$LFSVRS/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
udev_update) udev_update)
svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;; svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
esac esac
echo -ne "done\n" echo -ne "done\n"
@ -551,7 +551,7 @@ build_patches_file() { # Supply a suitably formated list of patches.
case ${PROGNAME} in case ${PROGNAME} in
hlfs) hlfs)
echo -n "Creating the ${L_arrow}${BOLD}HLFS${R_arrow} specific patcheslist_.wget file" echo -n "Creating the HLFS ${L_arrow}${BOLD}$MODEL${R_arrow} specific patches file"
xsltproc --nonet \ xsltproc --nonet \
--xinclude \ --xinclude \
--stringparam model $MODEL \ --stringparam model $MODEL \
@ -567,7 +567,7 @@ build_patches_file() { # Supply a suitably formated list of patches.
;; ;;
clfs) # Pull out a list of arch specific patches clfs) # Pull out a list of arch specific patches
echo -n "Creating CLFS ${L_arrow}${BOLD}$ARCH${R_arrow} specific patcheslist_.wget file" echo -n "Creating CLFS ${L_arrow}${BOLD}$ARCH${R_arrow} specific patches file"
xsltproc -xinclude \ xsltproc -xinclude \
-o patcheslist_.wget \ -o patcheslist_.wget \
patcheslist.xsl \ patcheslist.xsl \
@ -587,6 +587,8 @@ build_patches_file() { # Supply a suitably formated list of patches.
-e 's/uclibc/uClibc/'` -e 's/uclibc/uClibc/'`
done done
rm -f patcheslist_.wget
echo " ...OK" echo " ...OK"
} }
@ -626,7 +628,7 @@ extract_commands() { #
-o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;; ;;
hlfs) hlfs)
echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS architecture" echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation"
xsltproc --nonet \ xsltproc --nonet \
--xinclude \ --xinclude \
--stringparam model $MODEL \ --stringparam model $MODEL \
@ -698,7 +700,7 @@ extract_commands() { #
# We only want a list arch specific files.. # We only want a list arch specific files..
# Unfortunately this script produces URL's which must be converted to a std format # Unfortunately this script produces URL's which must be converted to a std format
echo -n "Creating CLFS ${L_arrow}${BOLD}${ARCH}${R_arrow} specific packageslist_.wget file" echo -n "Creating CLFS ${L_arrow}${BOLD}${ARCH}${R_arrow} specific packages file"
xsltproc -xinclude \ xsltproc -xinclude \
-o packageslist_.wget \ -o packageslist_.wget \
packageslist.xsl \ packageslist.xsl \
@ -719,11 +721,14 @@ extract_commands() { #
-e 's/-file.*//' \ -e 's/-file.*//' \
-e 's/"//g'` -e 's/"//g'`
done done
rm -f packageslist_.wget packages.tmp
echo " ...OK" echo " ...OK"
;; ;;
hlfs) hlfs)
echo -n "Creating <${PROGNAME}> specific packageslist_.wget file" echo -n "Creating <${PROGNAME}> specific packages file"
grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \ grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
-e 's@">@"@' \ -e 's@">@"@' \
-e '/generic/d' >> packages -e '/generic/d' >> packages
@ -731,7 +736,7 @@ extract_commands() { #
;; ;;
lfs) lfs)
echo -n "Creating <${PROGNAME}> specific packageslist_.wget file" echo -n "Creating <${PROGNAME}> specific packages file"
grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \ grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
-e 's@">@"@' \ -e 's@">@"@' \
-e '/generic/d' >> packages -e '/generic/d' >> packages
@ -746,7 +751,7 @@ extract_commands() { #
echo `grep "vim" packages | sed 's@vim@&-lang@'` >> packages echo `grep "vim" packages | sed 's@vim@&-lang@'` >> packages
fi fi
# There is no useful patches.ent file so we will create one. # Create the patches file
case "${PROGNAME}" in case "${PROGNAME}" in
hlfs) hlfs)
build_patches_file ;; build_patches_file ;;
@ -861,12 +866,12 @@ get_sources() {
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'` VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
case $PKG in case $PKG in
tcl) FILE="$PKG$VRS-src.tar.bz2" ;; tcl) FILE="$PKG$VRS-src.tar.bz2" ;;
vim-lang) PKG="vim" vim-lang) PKG="vim"
FILE="vim-$VRS-lang.tar.bz2" ;; FILE="vim-$VRS-lang.tar.bz2" ;;
udev-config) PKG="udev" udev-config) PKG="udev"
FILE="$VRS" ;; FILE="$VRS" ;;
*) FILE="$PKG-$VRS.tar.bz2" ;; *) FILE="$PKG-$VRS.tar.bz2" ;;
esac esac
download $PKG $FILE download $PKG $FILE