Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

/bin/ftp pkg and caching

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> /bin/ftp pkg and caching Page: [1]
Login
Message << Older Topic   Newer Topic >>
/bin/ftp pkg and caching - Nov. 12, '05, 9:55:29 AM   
cheusov

 

Posts: 12
Joined: Jul. 13, '05,
Status: offline
What about minor improvements of pkg_add/pkg_update
itilities?
I think it may useful feature to organize a cache
of downloaded files like this

/bin/ftp:
#!/bin/sh

if test "_$1" = "_-V" -a "_$2" = "_-o" -a "_$3" = "_-" -a "$#" = 4; then
cd /var/cache/pkg || exit 10
wget -v -c "$4" || exit 11
cat `echo $4 | sed 's,^.*/,,'` || exit 12
rm -f list
else
/bin/ftp.real "$@"
fi

This is just an example, not a complete solution.
I personally prefer wget, but it may also be good
to have ability to use alternative downloaders
like FreeBSD (AFAIK) does.
Post #: 1
RE: /bin/ftp pkg and caching - Nov. 12, '05, 1:20:18 PM   
Rodney

 

Posts: 3142
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
When you use pkg_update it downloads the list that has all of the most recent package
versions and the date of last update and caches it for doing checks already.
It does this by the '-L' option with ftp.

You are welcome to create your own similar alternative. You can use the "-l" (ell) option
with pkg_update to indicate your own location (aka cache). There are others who do
this with a ruby script. I had someone else write me just yesterday about another
set of tools he is using. The central theme in all of them should be the "list" file on
the ftp site that eliminates the guessing for what's updated, when, etc.

(in reply to cheusov)
Post #: 2
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> /bin/ftp pkg and caching Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031