SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

rupdate version 0.8

This program is released under the GPL license. There is no warranty, there is no guarantee. If something doesn't work how it is expected, feel free to file for a refund ;)
Written by: ShRyKe (shryke@kinex.net)

Dependencies
ruby www.ruby-lang.org

Great scripting language. Perlish in a way, but much cleaner, and true OO. Is worth the download (its a small download anyway). I believe its worth getting if for nothing else, running rupdate. I've looked for another solution, haven't found a decent one. If you know of a program/script that does what rupdate does please let me know, I'd like to view others and see how they work. wget ftp ftp.gnu.org/gnu/wget

rupdate uses wget in interactive mode. Not required for normal usage.

Description
Ruby Update is a simple script written in ruby to check for newer versions of programs. The idea came when I decided to get rid of all distros and use LFS (www.linuxfromscratch.org). I quickly noticed how much of a pain it is to keep up with program releases, which I feel is important for security reasons, and I hate to miss out on new stuff. I needed something that wasn't for any specific packaging solution (rpm, tgz, deb) since I install everything from source. I also wanted something that didn't depend on anyone physically keeping up with updates, hence using a txt file of latest packages on a server someplace. I wanted it to check each program's official server for the latest to be sure of accuracy. I looked for a solution but found none. Came across something I think was supposed to do the job, but it was written in perl, required a lot of perl modules to be installed, and personally I don't like perl, and I knew I'd want something easily hackable. Finally I decided to write one myself while experimenting with the ruby programming language, it was easier then I thought. Many thanks to checkkernelversion.rb, which is what spawned most of the beginning code to rupdate, and still has some pieces left in rupdate. Ruby Update should be usable to check for rpm, deb, tgz, or any other type of packaged files, although it would take some modification to the programs currently added. No other code should need to be changed, just the extension for each program. you'll see '.tar.gz' or similar.

The list of programs it checks has grown quite big, though it still isn't big enough. Small bug fixes and more programs added will probably finish off the 0.x releases, moving on to 1.x soon.

Usage:
Just run the script as if it were a perl script, either '$ rupdate', or '$ ruby rupdate'.

run time options:

rupdate i

        interactive mode.  upon finding an update it will ask you if you wish to download.  If yes,
        after all other checks are finished, it will download each program chosen one at a time using
        wget
rupdate v
        verbose mode.  Will show the status of every check.  Note however, that rupdate is approaching 
        100+ programs and using this mode can produce a lot of output.
rupdate version
        prints current version
rupdate help
        prints available run time options

Install: Just copy rupdate to a bin directory, or use it where it unpacks at.

Features
Fast. The script itself is extremely fast and unobtrusive, although how fast it runs ultimately depends on your internet connection, that can't be helped no matter how its programmed.

No dependencies. All you need is the ruby interpeter, and wget if you wish to use interactive mode, which most systems have installed anyway.

Easy. No setup is required. All you have to do is unpack it and run the script.

Customizable. The layout is easy for adding new programs. You can change the mirror thats used for sourceforge and gnu easily by changing one variable at the beginning of the script, but this isn't required.

Adding new programs:
For programs that use an ftp mirror:

aProgramName = DoUpdates.new("programname", `command to get version`[/regex for version/], "path on server", 'regex on server', 'extension') aProgramName.checkversion("program's server") Example:
aArts = DoUpdates.new("arts", `artsd -v 2>&1`[/(\d).(\d+)\.*(\d+)*/], "/pub/kde/stable/latest/src", '-(\d).(\d+)\.*(\d+)*', '.tar.bz2') aArts.checkversion("ftp ftp.kde.org")

For programs that use an http mirror, preferable with a directory listing:

The first line uses the same format, all that needs changing is the second line aBeaver.checkversionhttp("host name", 'port', "path to directory listing") Example:
aEterm.checkversionhttp("www.eterm.org", '80', "/download/") the trailing / is required for a directory listing, if a specific page is used its like: aBeaver.checkversionhttp("eturquin.free.fr", '80', "/beaver/dloads/dloads.html")


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.