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 |
|
Login |
|
|
/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.
|
|
|
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.
|
|
|
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 |
|
|
|