jhalfs suggestion

Bruce Dubbs bdubbs at swbell.net
Wed Jan 11 22:24:48 PST 2006


In the get_book function, there is the construct:

#----------------------------#
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.\"
  exit 1"
  cd $JHALFSDIR

  if [ -z $WC ] ; then
    echo -n "Downloading the LFS Book, version $LFSVRS... "


If the jhalfs.conf file has BOOK defined, it does not set WC.  Perhaps
the it should be set in jhalfs.conf if BOOK is set there:

if [ -n $BOOK ] ; then WC=1; fi

or more compactly (and less obviously):

[ $BOOK ] && WC=1

Alternatively, it could be put into the jhalfs script right after the
command:

source jhalfs.conf

also, if WC is defined, then the check for subversion is unnecessary.
The affects my students who will be given the book via a tar file, but
do not (yet) have subversion available.  Perhaps the start should be:

#----------------------------#
get_book() {
#----------------------------#

  if [ -z $WC ] ; then
    # Check for Subversion instead of just letting the script hit 'svn'
    # and fail.
    test `type -p svn` ||  \
      eval "echo 'This feature requires Subversion.'; exit 1"
    cd $JHALFSDIR
    echo -n "Downloading the LFS Book, version $LFSVRS... "

  -- Bruce



More information about the alfs-discuss mailing list