The feature I would like is:
Execute a script or command only after -i download is complete.
As a dialup user I like the limit speed option and will be using it as
part of some other things I am working on!
I just wrote a little script I call apt-slow which obtains a list of URI's
and downloads with wget. What I would like to do is after all the files
have been downloaded completely is run a couple of other commands. See
script below for specifics.
#!/bin/sh
# /usr/local/sbin/apt-slow
# This script downloads deb packages slowly with wget.
# get up to date list
apt-get update
$TMP2=/tmp/uris.tmp$$TMP
# Use apt to get a listing of what has changed, ie add and remove.
# Format the output to just contain the URI's
apt-get --print-uris -d -y dselect-upgrade | awk -F\' '{print $2}' | grep deb >$TMP2
# Get the files and put them in the right place for installing later
cd /var/cache/apt-slow
wget -i $TMP2 -c --limit-rate=2k -a /tmp/download-apt-slow --background
# View the download progress
tail -f /tmp/download-apt-slow
# TODO
echo "If download completed correctly... "
echo "mv /var/cache/apt-slow/*.deb /var/cache/apt/archives/ ; apt-get dselect--upgrade"
Thanks,
Chuck
Griffith Observatory Star Award
for excellence in promoting astronomy to the public through the World Wide Web.
StarrySkies Network The Starry Messenger
http://StarrySkies.com http://StarryMessenger.Net
publishing science the weekly newsletter of
articles since 1995. the StarrySkies Network
Chuck Peters, Systems Administrator, Network Engineer and Linux Tech.