jhalfs-X source archive

George Boudreau georgeb at linuxfromscratch.org
Wed Mar 15 12:53:18 PST 2006


Manuel,
   Before I make these changes, an opinion.

   Tor Olav Stava made a request for a config parameter which would hold
the location of a source archive. ( SRC_ARCHIVE ) This is how I see this
working for lfs,hlfs,clfs. ( BLFS is a separate beast altogether )


#----------------------------#
download() {                 #
#----------------------------#
   cd $BUILDDIR/sources

   # Hackish fix for the bash-doc, glibc-{linuxthreads,libidn}
   # that don't conform to norms in the URL scheme.
   DIR=`echo $1 | sed
's at -doc@@;s at -linuxthreads@@;s at -libidn@@;s at -testsuite@@'`

   # If the file exists in the archive, copy to the $BUILDDIR/sources dir
   # MD5SUM is assumed to be correct from previous download
   if [ ! -z ${SRC_ARCHIVE} ] &&
      [   -d ${SRC_ARCHIVE} ] &&
      [ -f ${SRC_ARCHIVE}/$2 ]; then
     cp -v ${SRC_ARCHIVE}/$2 .
     echo "$2: -- ok"
     return
   fi
.
<snip>
.
   # If we make it this far we should copy the freshly downloaded file
   # to the source archive. MD5SUM already validated
   if [ ! -z ${SRC_ARCHIVE} ] &&
      [   -d ${SRC_ARCHIVE} ] &&
      [ $2 = "MD5SUM" ]; then
       cp -v $2 ${SRC_ARCHIVE}
     fi
   fi
}






More information about the alfs-discuss mailing list