"Ramil Galib" <[EMAIL PROTECTED]> writes: > Hi guys! > > I want to download a file which changes over time (due to upgrades) on > the command line. > I use > wget -A 'program-<whatever new version here>.tar.gz' > http://program-location.com/repository/ > When there is a new version, I intend to use > wget -A 'program-*.tar.gz' http://program-location.com/repository/ > But I was not successful. > Any help?
In Debian/Ubuntu, there's a Perl utility in the devscripts[1] package called uscan(1) that can detect new versions of a file in a remote location, compared against a give current version. Package developers typically use this utility to grab new versions of sources for packages (in conjunction with uupdate(1) to produce an updated Debian package source tree,) and drive it via the debian/watch file, which specifies where to get the source, given a set criteria. Hence, if you have a program-0.04.tar.gz in http://pimp-my-program.com/download/ , you would write a `watchfile' somewhere containing: ,---- | version=3 | http://pimp-my-program.com/download/program-(.+)\.tar\.gz `---- Then you'd call uscan this way: ,---- | $ uscan --watchfile /path/to/watchfile --upstream-version 0.04 `---- If there's a new 0.05 version, uscan will get it for you; if not, nothing happens (use the --verbose flag for more gore.) Hope this helps; if it does, do check the manpages! Cheers, Zakame Footnotes: [1] http://packages.debian.org/stable/devel/devscripts -- Zak B. Elep [EMAIL PROTECTED] _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

