aMule Forum

English => aMule Help => Topic started by: starbuck on November 20, 2005, 06:14:16 PM

Title: shell script for automatic cvs file download
Post by: starbuck on November 20, 2005, 06:14:16 PM
Hello,

I am testing the latest cvs versions. But I am tired of downloading, building and installing the latest cvs version manually. So I decided to write a little shell script doing this automatically for me.

The shell script which should download the latest cvs-version, uninstall the old amule version, building the new one from cvs and installing it work so far.

At the moment only with a static filename (e.g aMule-CVS-20051120.tar.bz2).
This is no help so far because I have to change the filename matching to the latest version on the server.

So I have to make this variable.

There are several solutions to solve this issue. But for doing this I need a information on the server which is the latest file to download.

The easiest way is a file named aMule-CVS-latest.tar.bz2 on the server which I can download then directly.

Or a other possible way is a textfile on the server (e.g. latestversion) with the version information inside. So the script can look at the file and compare it with the installed amule version.
If the version on the server is newer as the installed one the script downloads the file otherwise not.

Could you please help me on this?

Thank you.
Title: Re: shell script for automatic cvs file download
Post by: wuischke on November 20, 2005, 06:48:44 PM
Hello Starbuck!
Here's sth. that might come handy for your work. ;)
Code: [Select]
#/bin/sh
wget hirnriss.net/files/cvs/aMule-CVS-$(date +%Y%m%d).tar.bz2
sudo rpmbuild -ta aMule-CVS-$(date +%Y%m%d).tar.bz2