2005-09-12 20:23:41 +02:00
|
|
|
#!/bin/sh
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
version="
|
2005-09-27 00:36:40 +02:00
|
|
|
jhalfs development
|
|
|
|
|
2005-09-28 21:30:31 +02:00
|
|
|
Originally written by Jeremy Huntwork.
|
2005-09-25 18:56:00 +02:00
|
|
|
Maintained by Manuel Canales Esparcia.
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
This program is published under the \
|
2005-09-25 18:56:00 +02:00
|
|
|
Gnu General Public License, Version 2.
|
|
|
|
"
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
usage="\
|
|
|
|
Usage: $0 [OPTION]
|
|
|
|
|
|
|
|
Options:
|
2005-09-25 18:56:00 +02:00
|
|
|
-h, --help print this help, then exit
|
|
|
|
-V, --version print version number, then exit
|
|
|
|
-L, --LFS-version=VER use VER version of the LFS book
|
|
|
|
-d --directory=DIR use DIR directory for building LFS; all files
|
|
|
|
jhalfs produces will be in the directory
|
|
|
|
DIR/jhalfs
|
|
|
|
-D, --download-client=CLIENT use CLIENT as the program for retrieving
|
|
|
|
packages
|
2005-09-29 21:14:06 +02:00
|
|
|
-T, --no-testsuites don't run the package's testsuites
|
|
|
|
-P, --have-packages don't download the packages
|
2005-09-11 23:03:26 +02:00
|
|
|
"
|
|
|
|
|
|
|
|
help="\
|
|
|
|
Try '$0 --help' for more information."
|
|
|
|
|
|
|
|
exit_missing_arg="\
|
|
|
|
echo \"Option '\$1' requires an argument\" >&2
|
|
|
|
echo \"\$help\" >&2
|
|
|
|
exit 1"
|
|
|
|
|
|
|
|
no_dl_client="\
|
|
|
|
echo \"Could not find a way to download the LFS sources.\" >&2
|
|
|
|
echo \"Attempting to continue.\" >&2"
|
|
|
|
|
|
|
|
while test $# -gt 0 ; do
|
2005-09-25 18:56:00 +02:00
|
|
|
case $1 in
|
|
|
|
--version | -V )
|
|
|
|
echo "$version"
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
|
|
|
--help | -h )
|
|
|
|
echo "$usage"
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
|
|
|
--LFS-version | -L )
|
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
|
|
|
shift
|
|
|
|
case $1 in
|
|
|
|
dev* | SVN | trunk )
|
|
|
|
LFSVRS=development
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "$1 is an unsupported version at this time."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
|
|
|
--directory | -d )
|
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
|
|
|
shift
|
|
|
|
BUILDDIR=$1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
|
|
|
--download-client | -D )
|
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
|
|
|
shift
|
|
|
|
DL=$1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
2005-09-28 21:30:31 +02:00
|
|
|
--no-testsuites | -T )
|
|
|
|
shift
|
|
|
|
TEST=1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
2005-09-29 21:14:06 +02:00
|
|
|
--have-packages | -P )
|
|
|
|
shift
|
|
|
|
HPKG=1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
2005-09-25 18:56:00 +02:00
|
|
|
* )
|
|
|
|
echo "$usage"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2005-09-11 23:03:26 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Test to make sure we're running the build as root
|
|
|
|
|
|
|
|
if [ "$UID" != "0" ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
echo "You must be logged in as root to successfully build LFS."
|
|
|
|
exit 1
|
2005-09-11 23:03:26 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Find the download client to use, if not already specified.
|
|
|
|
|
|
|
|
if [ -z $DL ] ; then
|
|
|
|
if [ `type -p wget` ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
DL=wget
|
2005-09-11 23:03:26 +02:00
|
|
|
elif [ `type -p curl` ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
DL=curl
|
2005-09-11 23:03:26 +02:00
|
|
|
else
|
2005-09-25 18:56:00 +02:00
|
|
|
eval "$no_dl_client"
|
2005-09-11 23:03:26 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
SVN="svn://svn.linuxfromscratch.org"
|
|
|
|
HTTP=http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/conglomeration
|
2005-09-12 04:04:26 +02:00
|
|
|
if [ -z $BUILDDIR ] ; then BUILDDIR=/mnt/lfs ; fi
|
2005-09-11 23:33:50 +02:00
|
|
|
JHALFSDIR=$BUILDDIR/jhalfs
|
2005-09-11 23:03:26 +02:00
|
|
|
LOG=build.log
|
2005-09-12 03:01:10 +02:00
|
|
|
MKFILE=$JHALFSDIR/Makefile
|
2005-09-25 18:56:00 +02:00
|
|
|
XSL=dump-commands.xsl
|
2005-09-28 21:30:31 +02:00
|
|
|
if [ -z $TEST ] ; then TEST=0 ; fi
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
get_book() {
|
|
|
|
# Check for Subversion instead of just letting the script hit 'svn' and fail.
|
|
|
|
test `type -p svn` || eval "echo \"This feature requires Subversion.\"
|
2005-09-25 18:56:00 +02:00
|
|
|
exit 1"
|
2005-09-11 23:33:50 +02:00
|
|
|
cd $JHALFSDIR
|
2005-09-12 20:23:41 +02:00
|
|
|
|
2005-09-11 23:03:26 +02:00
|
|
|
# Test to make sure the LFS version is set
|
|
|
|
if [ -z $LFSVRS ] ; then LFSVRS=development ; fi
|
|
|
|
echo -n "Downloading the LFS Book, version $LFSVRS... "
|
|
|
|
|
|
|
|
# Grab the LFS book fresh if it's missing, otherwise, update it from the
|
|
|
|
# repo. If we've already extracted the commands, move on to getting the
|
|
|
|
# sources.
|
|
|
|
if [ -d lfs-$LFSVRS ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
cd lfs-$LFSVRS
|
|
|
|
if svn up | grep -q At && test -d $JHALFSDIR/commands && \
|
|
|
|
test -f $JHALFSDIR/packages && test -f $JHALFSDIR/patches ; then
|
|
|
|
echo -ne "done\n"
|
|
|
|
get_sources
|
|
|
|
else
|
|
|
|
echo -ne "done\n"
|
|
|
|
extract_commands
|
|
|
|
fi
|
2005-09-11 23:03:26 +02:00
|
|
|
else
|
2005-09-25 18:56:00 +02:00
|
|
|
if [ $LFSVRS = development ] ; then
|
|
|
|
svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$JHALFSDIR/$LOG 2>&1
|
|
|
|
else
|
|
|
|
svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$JHALFSDIR/$LOG 2>&1
|
|
|
|
fi
|
|
|
|
echo -ne "done\n"
|
|
|
|
extract_commands
|
2005-09-11 23:03:26 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
extract_commands() {
|
|
|
|
# Check for libxslt instead of just letting the script hit 'xsltproc' and fail.
|
|
|
|
test `type -p xsltproc` || eval "echo \"This feature requires libxslt.\"
|
2005-09-25 18:56:00 +02:00
|
|
|
exit 1"
|
2005-09-11 23:33:50 +02:00
|
|
|
cd $JHALFSDIR
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
# Start clean
|
|
|
|
if [ -d commands ] ; then rm -rf commands ; fi && mkdir commands
|
|
|
|
echo -n "Extracting commands... "
|
|
|
|
|
2005-09-27 20:13:19 +02:00
|
|
|
# Dump the commands in shell script form from the LFS book.
|
2005-09-28 21:30:31 +02:00
|
|
|
xsltproc --nonet --xinclude --stringparam testsuite $TEST -o ./commands/ \
|
|
|
|
$XSL lfs-$LFSVRS/index.xml >>$JHALFSDIR/$LOG 2>&1
|
2005-09-11 23:03:26 +02:00
|
|
|
|
|
|
|
# Grab the patches and package names.
|
2005-09-11 23:33:50 +02:00
|
|
|
cd $JHALFSDIR
|
2005-09-11 23:03:26 +02:00
|
|
|
for i in patches packages ; do rm -f $i ; done
|
|
|
|
grep "\-version" lfs-$LFSVRS/general.ent | sed -e 's@<!ENTITY @@' -e 's@">@"@' \
|
2005-09-25 18:56:00 +02:00
|
|
|
-e '/generic/d' >> packages
|
2005-09-11 23:03:26 +02:00
|
|
|
grep "ENTITY" lfs-$LFSVRS/patches.ent | sed -e 's/.* "//' -e 's/">//' >> patches
|
|
|
|
|
|
|
|
# Done. Moving on...
|
|
|
|
echo -ne "done\n"
|
|
|
|
get_sources
|
|
|
|
}
|
|
|
|
|
|
|
|
download() {
|
|
|
|
cd $BUILDDIR/sources
|
|
|
|
|
|
|
|
# Hackish fix for the bash-doc package that doesn't conform
|
|
|
|
# to norms in the URL scheme.
|
|
|
|
DIR=`echo $1 | sed 's@-doc@@'`
|
|
|
|
|
|
|
|
# Find the md5 sum for this package.
|
|
|
|
if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi
|
|
|
|
|
|
|
|
if [ ! -f $2 ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
case $DL in
|
|
|
|
wget )
|
|
|
|
wget $HTTP/$DIR/$2
|
|
|
|
;;
|
|
|
|
curl )
|
|
|
|
`curl -# $HTTP/$DIR/$2 -o $2`
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "$DL not supported at this time."
|
|
|
|
;;
|
|
|
|
esac
|
2005-09-11 23:03:26 +02:00
|
|
|
elif ! echo "$MD5" | md5sum -c - >/dev/null 2>/dev/null ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
case $DL in
|
|
|
|
wget )
|
|
|
|
wget -c $HTTP/$DIR/$2
|
|
|
|
;;
|
|
|
|
curl )
|
|
|
|
`curl -# -C - $HTTP/$DIR/$2 -o $2`
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "$DL not supported at this time."
|
|
|
|
;;
|
|
|
|
esac
|
2005-09-11 23:03:26 +02:00
|
|
|
fi
|
|
|
|
if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
get_sources() {
|
|
|
|
|
2005-09-29 21:14:06 +02:00
|
|
|
# Test if the packages must be downloaded
|
|
|
|
if [ -z $HPKG ] ; then
|
2005-09-11 23:03:26 +02:00
|
|
|
|
2005-09-29 21:14:06 +02:00
|
|
|
# This variable is necessary to make sure the `cat $JHALFSDIR/packages`
|
|
|
|
# separates each iteration by lines. It is necessary to have the second
|
|
|
|
# ' on the next line.
|
|
|
|
IFS='
|
|
|
|
'
|
2005-09-11 23:03:26 +02:00
|
|
|
|
2005-09-29 21:14:06 +02:00
|
|
|
if [ ! -d $BUILDDIR/sources ] ; then mkdir $BUILDDIR/sources ; fi
|
|
|
|
cd $BUILDDIR/sources
|
|
|
|
if [ -f MD5SUMS ] ; then rm MD5SUMS ; fi
|
|
|
|
|
|
|
|
download "" MD5SUMS
|
|
|
|
|
|
|
|
# Iterate through each package and grab it, along with any patches it needs.
|
|
|
|
for i in `cat $JHALFSDIR/packages` ; do
|
|
|
|
PKG=`echo $i | sed 's/-version.*//'`
|
|
|
|
|
|
|
|
# Someone used some silly entities right next to the valid package entities.
|
|
|
|
if [ "$PKG" = "expect-lib" -o "$PKG" = "linux-dl" ] ; then continue ; fi
|
|
|
|
|
|
|
|
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
|
|
|
if [ "$PKG" = "tcl" ] ; then
|
|
|
|
FILE="$PKG$VRS-src.tar.bz2"
|
|
|
|
else
|
|
|
|
FILE="$PKG-$VRS.tar.bz2"
|
|
|
|
fi
|
|
|
|
download $PKG $FILE
|
|
|
|
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
|
|
|
PATCH=`echo $patch | sed 's@&'$PKG'-version;@'$VRS'@'`
|
|
|
|
download $PKG $PATCH
|
|
|
|
done
|
2005-09-12 20:23:41 +02:00
|
|
|
done
|
2005-09-29 21:14:06 +02:00
|
|
|
fi
|
2005-09-11 23:03:26 +02:00
|
|
|
}
|
|
|
|
|
2005-09-12 03:01:10 +02:00
|
|
|
build_Makefile() {
|
2005-09-12 04:53:48 +02:00
|
|
|
echo -n "Creating Makefile... "
|
2005-09-12 03:01:10 +02:00
|
|
|
cd $JHALFSDIR/commands
|
2005-09-12 20:23:41 +02:00
|
|
|
|
2005-09-12 03:01:10 +02:00
|
|
|
# Start with a clean Makefile.tmp file
|
|
|
|
>$MKFILE.tmp
|
|
|
|
|
2005-09-28 00:33:06 +02:00
|
|
|
for file in chapter05/* ; do
|
2005-09-27 00:36:40 +02:00
|
|
|
# Keep the script file name
|
|
|
|
i=`basename $file`
|
|
|
|
|
|
|
|
# First append each name of the script files to a list (this will become
|
2005-09-25 18:56:00 +02:00
|
|
|
# the names of the targets in the Makefile
|
2005-09-28 00:33:06 +02:00
|
|
|
chapter5="$chapter5 $i"
|
2005-09-25 18:56:00 +02:00
|
|
|
|
|
|
|
# Grab the name of the target (minus the -pass1 or -pass2 in the case of gcc
|
|
|
|
# and binutils in chapter 5)
|
|
|
|
name=`echo $i | sed -e 's@[0-9]\{3\}-@@' -e 's@-pass[0-9]\{1\}@@'`
|
|
|
|
|
|
|
|
# Drop in the name of the target on a new line.
|
|
|
|
echo -e "\n$i:" >> $MKFILE.tmp
|
|
|
|
|
|
|
|
# Find the version of the command files, if it corresponds with the building of
|
|
|
|
# a specific package
|
|
|
|
vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
|
|
|
|
|
|
|
|
# If $vrs isn't empty, we've got a package...
|
|
|
|
if [ "$vrs" != "" ] ; then
|
|
|
|
if [ "$name" = "tcl" ] ; then
|
|
|
|
FILE="$name$vrs-src.tar.bz2"
|
|
|
|
else
|
|
|
|
FILE="$name-$vrs.tar.bz2"
|
|
|
|
fi
|
|
|
|
|
2005-09-29 21:14:06 +02:00
|
|
|
# Insert instructions for unpacking the package and to set
|
|
|
|
# the PKGDIR variable.
|
2005-09-28 00:33:06 +02:00
|
|
|
echo -e "\t\$(call unpack-lfs,$FILE) && \\" >> $MKFILE.tmp
|
2005-09-25 18:56:00 +02:00
|
|
|
echo -e "\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
|
2005-09-29 20:50:18 +02:00
|
|
|
echo -e "\tchown -R lfs \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
|
|
|
|
echo -e "\techo \"PKGDIR=\$(LFS)\$(SRC)/\$\$ROOT\" > envars && \\" >> $MKFILE.tmp
|
|
|
|
echo -e "\techo \"export PKGDIR\" >> envars && \\" >> $MKFILE.tmp
|
2005-09-25 18:56:00 +02:00
|
|
|
fi
|
|
|
|
|
2005-09-28 00:33:06 +02:00
|
|
|
# Insert the script run
|
2005-09-29 20:50:18 +02:00
|
|
|
echo -e "\tsu - lfs -c \". /home/lfs/.bashrc && $JHALFSDIR/commands/$file\" && \\" >> $MKFILE.tmp
|
2005-09-25 18:56:00 +02:00
|
|
|
|
2005-09-29 20:50:18 +02:00
|
|
|
# Include a touch of the target name so make can check
|
|
|
|
# if it's already been made.
|
2005-09-25 18:56:00 +02:00
|
|
|
echo -e "\ttouch \$@" >> $MKFILE.tmp
|
2005-09-29 20:50:18 +02:00
|
|
|
|
|
|
|
# Remove the build directory(ies), including if the build has failed.
|
|
|
|
if [ "$vrs" != "" ] ; then
|
|
|
|
echo -e "\trm -r \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
|
|
|
|
echo -e "\tif [ -e \$(LFS)\$(SRC)/*-build ]; then \\" >> $MKFILE.tmp
|
|
|
|
echo -e "\t\t rm -r \$(LFS)\$(SRC)/*-build; \\" >> $MKFILE.tmp
|
|
|
|
echo -e "\tfi;" >> $MKFILE.tmp
|
|
|
|
fi
|
|
|
|
|
2005-09-12 03:01:10 +02:00
|
|
|
done
|
2005-09-12 04:53:48 +02:00
|
|
|
|
2005-09-12 20:23:41 +02:00
|
|
|
# Stick a variable and some defines at the top of the real makefile
|
2005-09-12 04:53:48 +02:00
|
|
|
echo "export SRC := /sources" > $MKFILE
|
|
|
|
echo "export LFS := $BUILDDIR" >> $MKFILE
|
2005-09-28 00:33:06 +02:00
|
|
|
echo "define unpack-lfs" >> $MKFILE
|
|
|
|
echo -e "\t@cd \$(LFS)\$(SRC) ; tar -xvjf \$(1) > /tmp/unpacked" >> $MKFILE
|
|
|
|
echo -e "endef\n" >> $MKFILE
|
2005-09-12 04:53:48 +02:00
|
|
|
echo "define unpack" >> $MKFILE
|
|
|
|
echo -e "\t@cd \$(SRC) ; tar -xvf \$(1) > /tmp/unpacked" >> $MKFILE
|
|
|
|
echo -e "endef\n" >> $MKFILE
|
|
|
|
|
2005-09-28 00:33:06 +02:00
|
|
|
# Drop in the main target 'all:' and the chapter targets with each sub-target
|
|
|
|
# as a dependency.
|
|
|
|
echo -e "all: chapter4 chapter5\n" >> $MKFILE
|
|
|
|
echo -e "chapter4: 020-creatingtoolsdir 021-addinguser 022-settingenvironment\n" >> $MKFILE
|
|
|
|
echo -e "chapter5: $chapter5\n" >> $MKFILE
|
|
|
|
|
|
|
|
# Clean targets
|
2005-09-29 20:50:18 +02:00
|
|
|
echo "clean: clean-chapter5 clean-chapter4" >> $MKFILE
|
|
|
|
|
2005-09-28 00:33:06 +02:00
|
|
|
echo "clean-chapter4:" >> $MKFILE
|
|
|
|
echo -e "\tuserdel lfs && \\" >> $MKFILE
|
|
|
|
echo -e "\trm -r /home/lfs && \\" >> $MKFILE
|
|
|
|
echo -e "\trm -r \$(LFS)/tools && \\" >> $MKFILE
|
|
|
|
echo -e "\trm /tools" >> $MKFILE
|
2005-09-29 20:50:18 +02:00
|
|
|
echo -e "\trm 02*\n" >> $MKFILE
|
|
|
|
|
|
|
|
echo "clean-chapter5:" >> $MKFILE
|
|
|
|
echo -e "\trm -r \$(LFS)/tools/* && \\" >> $MKFILE
|
|
|
|
echo -e "\trm -f $chapter5\n" >> $MKFILE
|
2005-09-28 00:33:06 +02:00
|
|
|
|
2005-09-29 20:50:18 +02:00
|
|
|
# The chapter4 sub-targets are hard-coded to can create the lfs user,
|
|
|
|
# to make the scripts executables, and to create a clean environment
|
|
|
|
# for the lfs user.
|
2005-09-28 00:33:06 +02:00
|
|
|
echo "020-creatingtoolsdir:" >> $MKFILE
|
|
|
|
echo -e "\tmkdir \$(LFS)/tools && \\" >> $MKFILE
|
|
|
|
echo -e "\tln -s \$(LFS)/tools / && \\" >> $MKFILE
|
|
|
|
echo -e "\ttouch \$@\n" >> $MKFILE
|
|
|
|
|
|
|
|
echo "021-addinguser:" >> $MKFILE
|
|
|
|
echo -e "\tgroupadd lfs && \\" >> $MKFILE
|
|
|
|
echo -e "\tuseradd -s /bin/bash -g lfs -m -k /dev/null lfs && \\" >> $MKFILE
|
|
|
|
echo -e "\tchown lfs \$(LFS)/tools && \\" >> $MKFILE
|
|
|
|
echo -e "\tchown lfs \$(LFS)/sources && \\" >> $MKFILE
|
|
|
|
# Make the scripts executables
|
|
|
|
echo -e "\tchmod -R +x $JHALFSDIR/commands && \\" >> $MKFILE
|
|
|
|
echo -e "\ttouch \$@\n" >> $MKFILE
|
|
|
|
|
|
|
|
echo "022-settingenvironment:" >> $MKFILE
|
|
|
|
echo -e "\techo \"exec env -i HOME=\\\$\$HOME TERM=\\\$\$TERM PS1='\u:\w\$$ ' /bin/bash\" > /home/lfs/.bash_profile && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"set +h\" > /home/lfs/.bashrc && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"umask 022\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"LFS=/mnt/lfs\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"LC_ALL=POSIX\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"PATH=/tools/bin:/bin:/usr/bin\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
|
|
|
echo -e "\techo \"export LFS LC_ALL PATH\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
2005-09-29 20:50:18 +02:00
|
|
|
# Source the file where we place changing variables.
|
|
|
|
echo -e "\techo \". $JHALFSDIR/envars\" >> /home/lfs/.bashrc && \\" >> $MKFILE
|
2005-09-28 00:33:06 +02:00
|
|
|
echo -e "\tchown lfs /home/lfs/.bash* && \\" >> $MKFILE
|
2005-09-29 20:50:18 +02:00
|
|
|
echo -e "\ttouch envars && \\" >> $MKFILE
|
2005-09-28 00:33:06 +02:00
|
|
|
echo -e "\ttouch \$@\n" >> $MKFILE
|
|
|
|
|
2005-09-12 04:53:48 +02:00
|
|
|
|
|
|
|
# Bring over the items from the Makefile.tmp
|
|
|
|
cat $MKFILE.tmp >> $MKFILE
|
|
|
|
rm $MKFILE.tmp
|
|
|
|
echo -ne "done\n"
|
2005-09-12 03:01:10 +02:00
|
|
|
}
|
|
|
|
|
2005-09-11 23:03:26 +02:00
|
|
|
|
2005-09-11 23:33:50 +02:00
|
|
|
if [ ! -d $JHALFSDIR ] ; then
|
2005-09-25 18:56:00 +02:00
|
|
|
mkdir -p $JHALFSDIR
|
2005-09-11 23:03:26 +02:00
|
|
|
fi
|
|
|
|
|
2005-09-11 23:33:50 +02:00
|
|
|
>$JHALFSDIR/$LOG
|
2005-09-26 20:11:48 +02:00
|
|
|
|
|
|
|
if [ "$PWD" != "$JHALFSDIR" ] ; then
|
|
|
|
cp $0 $XSL $JHALFSDIR/
|
|
|
|
fi
|
|
|
|
|
2005-09-11 23:03:26 +02:00
|
|
|
get_book
|
2005-09-12 03:01:10 +02:00
|
|
|
build_Makefile
|