diff --git a/dump-lfs-scripts.xsl b/dump-lfs-scripts.xsl index 221e02e..c85299f 100644 --- a/dump-lfs-scripts.xsl +++ b/dump-lfs-scripts.xsl @@ -1,4 +1,9 @@ + + %general-entities; +]> + + + + @@ -65,6 +73,9 @@ @id='ch-tools-adjusting' or @id='ch-system-readjusting'"> cd $PKGDIR + + tar -xvf ../vim-&vim-version;-lang.* + exit diff --git a/jhalfs b/jhalfs index 26f8b20..e9e638d 100755 --- a/jhalfs +++ b/jhalfs @@ -63,6 +63,8 @@ Options: LFS system. If not specified, a default /etc/fstab file with dummy values is created. + + --no-vim-lang don't install the optional vim-lang package -C, --kernel-config FILE use the kernel configuration file specified in FILE to build the kernel. If the file is @@ -105,12 +107,6 @@ get_book() { exit 1" cd $JHALFSDIR - # Test to make sure the LFS version is set - if [ -z $LFSVRS ] ; then LFSVRS=development ; fi - - # Set the book's sources directory - if [ -z $BOOK ] ; then BOOK=lfs-$LFSVRS ; fi - if [ -z $WC ] ; then echo -n "Downloading the LFS Book, version $LFSVRS... " @@ -159,8 +155,8 @@ extract_commands() { # Dump the commands in shell script form from the LFS book. xsltproc --nonet --xinclude --stringparam testsuite $TEST \ - --stringparam toolchaintest $TOOLCHAINTEST -o ./commands/ \ - $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 + --stringparam toolchaintest $TOOLCHAINTEST --stringparam vim-lang $VIMLANG \ + -o ./commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 # Make the scripts executable. chmod -R +x $JHALFSDIR/commands @@ -171,6 +167,10 @@ extract_commands() { grep "\-version" $BOOK/general.ent | sed -e 's@@"@' \ -e '/generic/d' >> packages echo `grep "glibc" packages | sed 's@glibc@&-linuxthreads@'` >> packages + # Download the vim-lang package if it must be installed + if [ "$VIMLANG" = "1" ] ; then + echo `grep "vim" packages | sed 's@vim@&-lang@'` >> packages + fi echo `grep "udev-config-file" $BOOK/general.ent | sed -e 's@@"@'` >> packages # Download the module-init-tools-testsuite package only # if the test suite will be run. @@ -262,6 +262,9 @@ get_sources() { VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'` if [ "$PKG" = "tcl" ] ; then FILE="$PKG$VRS-src.tar.bz2" + elif [ "$PKG" = "vim-lang" ] ; then + PKG="vim" + FILE="vim-$VRS-lang.tar.bz2" elif [ "$PKG" = "udev-config" ] ; then PKG="udev" FILE="$VRS" @@ -918,6 +921,8 @@ while test $# -gt 0 ; do --run-make | -M ) RUNMAKE=1 ;; --no-toolchain-test ) TOOLCHAINTEST=0 ;; + + --no-vim-lang ) VIMLANG=0 ;; --page_size ) test $# = 1 && eval "$exit_missing_arg" @@ -989,7 +994,9 @@ if [ -z $DL ] ; then fi [[ ! -d $JHALFSDIR ]] && mkdir -pv $JHALFSDIR -[[ "$PWD" != "$JHALFSDIR" ]] && cp -v $FILES $JHALFSDIR/ +[[ "$PWD" != "$JHALFSDIR" ]] && cp -v $FILES $JHALFSDIR/ && \ + sed -e 's/FAKEDIR/'$BOOK'/' $XSL > $JHALFSDIR/dump-lfs-scripts.xsl && \ + export XSL=$JHALFSDIR/dump-lfs-scripts.xsl [[ ! -d $LOGDIR ]] && mkdir -v $LOGDIR >$LOGDIR/$LOG diff --git a/jhalfs.conf b/jhalfs.conf index e33bb88..eefa1a6 100644 --- a/jhalfs.conf +++ b/jhalfs.conf @@ -6,20 +6,11 @@ declare -r SVN="svn://svn.linuxfromscratch.org" declare -r HTTP=http://ftp.lfs-matrix.net/pub/lfs/conglomeration -declare -r XSL=dump-lfs-scripts.xsl declare -r LOG=000-jhalfs.log -#--- Files that will be copied to $JHALFSDIR -FILES="functions dump-lfs-scripts.xsl" - #--- Mount point for the build BUILDDIR=/mnt/lfs -#--- Working directories -JHALFSDIR=$BUILDDIR/jhalfs - LOGDIR=$JHALFSDIR/logs - MKFILE=$JHALFSDIR/Makefile - #--- Download the source packages 0(no)/1(yes) HPKG=0 @@ -38,6 +29,33 @@ PAGE=letter #--- set default timezone. TIMEZONE=Europe/London +#--- install the optional vim-lang package 0(no)/1(yes) +VIMLANG=1 + +#--- Location of fstab file (if empty, a template is created) +FSTAB= + #--- Location of kernel config file (if the kernel is to be compiled) CONFIG= + + +#==== INTERNAL VARIABLES ==== +# Don't edit it unless you know what you are doing + +#--- Default stylesheet +XSL=dump-lfs-scripts.xsl + +#--- Files that will be copied to $JHALFSDIR +FILES="functions" + +#--- Working directories +JHALFSDIR=$BUILDDIR/jhalfs + LOGDIR=$JHALFSDIR/logs + MKFILE=$JHALFSDIR/Makefile + +#--- Book version +LFSVRS=development + +#--- Book's sources directory +BOOK=lfs-$LFSVRS