diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-09-27 17:35:57 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-09-27 17:35:57 -0700 |
commit | 3a78e323730c87d006d36fd1f8c30ce16164b945 (patch) | |
tree | e83f2b6eade1dd367b2bc71c45e79a5daaf03088 /scripts | |
parent | b47d02e999233cb8b87b7dbc62a28a6a1701aa69 (diff) | |
download | vyatta-op-3a78e323730c87d006d36fd1f8c30ce16164b945.tar.gz vyatta-op-3a78e323730c87d006d36fd1f8c30ce16164b945.zip |
rename show_version to vyatta-show-version
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-version (renamed from scripts/show_version) | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/show_version b/scripts/vyatta-show-version index ffb2da0..636f2c0 100755 --- a/scripts/show_version +++ b/scripts/vyatta-show-version @@ -23,12 +23,24 @@ # TODO add other version info -for cl in /usr/share/doc/vyatta-*/changelog.gz ; do - dir=${cl%/*} ; - pkg=${dir##*/} ; +shopt -s extglob +shopt -s nullglob + +declare -a cls=( /usr/share/doc/vyatta-*/changelog.gz ) +declare -a cl_dirs=( ${cls[@]%/*} ) +declare -a pkgs=( ${cl_dirs[@]##*/} ) + +dpkg -l ${pkgs[@]} + +cat <<EOF + +Source Repositories +EOF + +for pkg in ${pkgs[@]} ; do printf " %-20s " ${pkg} ; test ${#pkg} -lt 20 || echo -ne \\n\\t ; - gunzip -c $cl | tail -n1 ; + gunzip -c /usr/share/doc/$pkg/changelog.gz | tail -n1 ; done ### Local Variables: |