[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian archive names



On Fri, Aug 06, 1999 at 08:04:29PM -0500, Michael Merten wrote:
> Is there a file in the debian package archvies that maps the current
> distribution names with the release names? (something that tells you
> that slink=stable, potato=unstable, etc) I'm looking for something
> that is kept up to date as the archive changes, that I can grep from a
> script.

there's no file AFAIK but you can find it by examining the symlinks.
they're always up to date as the archive changes :)


there are better ways of doing this with various tools (and in other
languages) but the following sh commands should work on any unix with
GNU ls, GNU grep, and any awk.


$ stable=`/bin/ls -l /debian/dists/ | \
	grep -- " stable ->"  | \
		awk '{ print $11 }' `
$ echo $stable
slink

$ unstable=`/bin/ls -l /debian/dists/ | \
	grep -- " unstable ->"  | \
		awk '{ print $11 }' `
$ echo $unstable
potato

$ frozen=`/bin/ls -l /debian/dists/ | \
	grep -- " frozen ->"  | \
		awk '{ print $11 }' `
$ echo $frozen


craig

--
craig sanders


Reply to: