On 12/5/06, Rainer Peter Feller
<[EMAIL PROTECTED]> wrote:
On Tue, 2006-12-05 at 02:12 -0500, Colin Dean wrote:
> Chris Staub wrote:
> > Colin Dean wrote:
> >> I recently finished a build of LFS 6.2, and quickly realized that
> >> there is no way to get the packages for BLFS or other packages from
> >> within a fresh built LFS environment.
> >>

<snip>

> > LFS includes inetutils, which has several internet programs, including ftp.
>
> Ah, I see that now--having FTP is definitely a boon, but aren't the
> majority of packages available via HTTP?
your distro your rules ...
just install wget ... and yes may be it should be a component of lfs :-)

just use this piece of script fu for http file downloading - I really
should troll the archives and find out the proper attribution for this
code, but it never seems I have enough time ;)

------------< add to /etc/profile >-------------------

# Function to get the contents of a URL and display to STDOUT
httpget () {
 h=${1#http://}
 h=${h%%/*}
 p=${h#*:}
 if [ "$p" = "$h" ]; then
   p='80'
 fi
 f=${1#http://*/}
 if [ "$f" = "$1" ]; then
   f='/'
 else
   if [ -z "$f" ]; then
     f='/'
   else
     f="/$f"
   fi
 fi
 ( echo -e "GET $f HTTP/1.0\r\nHost: $h\r\n\r\n" 1>&3 & cat 0<&3 )
3<>/dev/tcp/$h/$p \
 | (read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat)
}

# Export the function we have created
export -f httpget

-------------------------------------------

the after login\sourceing profile, you can use

httpget http://my.http.file.location/filename.extenstion > filename.extension

no additional binaries required.

--
-- -
Steve Crosby
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to