cvs commit: ALFS/nALFS bootstrap

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Mon Nov 10 20:20:54 PST 2003


kpfleming    03/11/10 21:20:54

  Modified:    nALFS    bootstrap
  Log:
  separate -d option into -d/-g options
  make all options require a {version} argument
  add code to download specified profile and unpack it
  
  Revision  Changes    Path
  1.21      +40 -9     ALFS/nALFS/bootstrap
  
  Index: bootstrap
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/bootstrap,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- bootstrap	11 Nov 2003 03:37:07 -0000	1.20
  +++ bootstrap	11 Nov 2003 04:20:54 -0000	1.21
  @@ -34,19 +34,33 @@
       cp -R download/${1}/* doc/${2}
   }
   
  +get_profile() {
  +    ${WGET} -P download ${PROFILE_URL_BASE}/profile-LFS-${PROFILE_VERSION}.tar.bz2
  +    bzcat download/profile-LFS-${PROFILE_VERSION}.tar.bz2 | tar --extract --directory=profile
  +    rm profile/*/*.dtd
  +    ln -sf ../../doc/ALFS.dtd profile/*
  +    #temporary fix until official profile has proper DTD name
  +    perl -pi -e 's/nalfs.dtd/ALFS.dtd/' profile/*/LFS-*.xml
  +}
  +
   get_dtd() {
       cp ../DTD/${1}-${DTD_VERSION}.dtd doc/${1}.dtd
   }
   
  -mkdir -p download
  -
  -while getopts dp param; do
  +while getopts d:g:p: param; do
       case $param in
   	d)
  -	    echo Getting docs...
  -	    DOC_URL_BASE=http://www.linuxfromscratch.org/~jwrober
  -	    DOC_VERSION=CVS
  -	    DTD_VERSION=CVS
  +	    mkdir -p download
  +	    DTD_VERSION=${OPTARG}
  +	    echo Getting ${DTD_VERSION} version of DTD...
  +	    get_dtd ALFS
  +	    echo done.
  +	    ;;
  +	g)
  +	    mkdir -p download
  +	    DOC_VERSION=${OPTARG}
  +	    echo Getting ${DOC_VERSION} version of guides...
  +	    DOC_URL_BASE=http://linuxfromscratch.org/~jwrober
   	    get_text_doc ALFS-SYNTAX-DOC syntax_doc
   	    get_text_doc nALFS-USERS-GUIDE users_guide
   	    get_text_doc nALFS-HACKERS-GUIDE hackers_guide
  @@ -56,20 +70,37 @@
   	    get_html_nohunks_doc ALFS-SYNTAX-DOC syntax_doc
   	    get_html_nohunks_doc nALFS-USERS-GUIDE users_guide
   	    get_html_nohunks_doc nALFS-HACKERS-GUIDE hackers_guide
  -	    get_dtd ALFS
  +	    echo done.
   	    ;;
   	p)
  -	    echo Getting profile...
  +	    mkdir -p download
  +	    mkdir -p profile
  +	    PROFILE_URL_BASE=http://www.linuxfromscratch.org/alfs/downloads/profiles
  +	    PROFILE_VERSION=${OPTARG}
  +	    echo Getting ${PROFILE_VERSION} of profile...
  +	    get_profile
  +	    echo done.
   	    ;;
       esac
   done
   
  +if test "${param}" = "?" -a ${OPTIND} -gt 1; then
  +    cat 1>&2 <<"EOF"
  +nALFS bootscript supports the following optional arguments:
  +    -d {version} downloads specified version of the DTD
  +    -g {version} downloads specified version of the guides
  +    -p {version} downloads specified version of the LFS profile
  +EOF
  +    exit 1
  +fi
  +
   # some 'macros' for processing filename lists
   SP2NL="tr '\040' '\012'"
   NL2SP="tr '\015\012' '\040\040'"
   
   # create a directory for the GNU autotools to put their stuff into
   mkdir -p gnubuild
  +
   # create nALFS-config.in to quiet autoconf, which will overwrite it later
   touch nALFS-config.in
   
  
  
  



More information about the alfs-log mailing list