diff options
author | Jon Hood <squinky86@gentoo.org> | 2004-11-27 18:21:00 +0000 |
---|---|---|
committer | Jon Hood <squinky86@gentoo.org> | 2004-11-27 18:21:00 +0000 |
commit | e266b874ec75bc2c8360ee107d3046f3ebf45bdc (patch) | |
tree | 732ddcbf0e160581d848e85edd2c889885cb75da /net-p2p/gift-gnutella/files | |
parent | stable on x86 (diff) | |
download | historical-e266b874ec75bc2c8360ee107d3046f3ebf45bdc.tar.gz historical-e266b874ec75bc2c8360ee107d3046f3ebf45bdc.tar.bz2 historical-e266b874ec75bc2c8360ee107d3046f3ebf45bdc.zip |
fix cache updating script
Diffstat (limited to 'net-p2p/gift-gnutella/files')
-rw-r--r-- | net-p2p/gift-gnutella/files/cacheupdate.sh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/net-p2p/gift-gnutella/files/cacheupdate.sh b/net-p2p/gift-gnutella/files/cacheupdate.sh index 85f3e45a3aea..64f70fff51d1 100644 --- a/net-p2p/gift-gnutella/files/cacheupdate.sh +++ b/net-p2p/gift-gnutella/files/cacheupdate.sh @@ -1,20 +1,22 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/gift-gnutella/files/cacheupdate.sh,v 1.6 2004/10/29 19:42:42 squinky86 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/gift-gnutella/files/cacheupdate.sh,v 1.7 2004/11/27 18:21:00 squinky86 Exp $ if [ -d ~/.giFT/Gnutella/ ]; then cd ~/.giFT/Gnutella - wget http://loot.alumnigroup.org/?get=1\&hostfile=1\&net=gnutella2\&client=GEN2\&version=0.1 -O gwebcaches.new || die "Unable to retrieve new caches." - grep "u|" gwebcaches.new > gwebcaches.new1 - sed -i -e 's:u|::g' gwebcaches.new1 - sed -i -e 's:|.*::g' gwebcaches.new1 - mv gwebcaches.new1 gwebcaches - grep "h|" gwebcaches.new | grep -v "ph|" > nodes.new - sed -i -e 's:h|::g' nodes.new - sed -i -e 's:|.*::g' nodes.new - mv nodes.new nodes - rm gwebcaches.new + wget http://crab.bishopston.net:3558/?urlfile=1\&client=GEN2\&version=0.2 -O gwebcaches.new || die "Unable to retrieve new caches." + if [ "`grep ERROR gwebcaches.new`" ]; then + cat gwebcaches.new + else + mv gwebcaches.new gwebcaches + fi + wget http://crab.bishopston.net:3558/?hostfile=1\&client=GEN2\&version=0.2 -O nodes.new || die "Unable to retrieve new hosts." + if [ "`grep ERROR nodes.new`" ]; then + cat nodes.new + else + mv nodes.new nodes + fi echo "Update complete!" else echo "Please emerge gift-gnutella and run gift-setup." |