diff options
author | idl0r <idl0r@gentoo.org> | 2009-09-28 18:57:19 +0000 |
---|---|---|
committer | idl0r <idl0r@gentoo.org> | 2009-09-28 18:57:19 +0000 |
commit | fe8bb304a1e75b7fb6481ba0c66faffbae94e7b3 (patch) | |
tree | 97e5ab80f787fb7e316acf1c8400b3ea722c0c3e | |
parent | Make eshowkw a bit more POSIX compliant when using /bin/sh, thanks to Daniel ... (diff) | |
download | gentoolkit-fe8bb304a1e75b7fb6481ba0c66faffbae94e7b3.tar.gz gentoolkit-fe8bb304a1e75b7fb6481ba0c66faffbae94e7b3.tar.bz2 gentoolkit-fe8bb304a1e75b7fb6481ba0c66faffbae94e7b3.zip |
Ignore comments when parsing arch.list, thanks to Fabian Groffen <grobian@gentoo.org>.
svn path=/trunk/gentoolkit-dev/; revision=687
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/eshowkw/eshowkw | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -1,6 +1,8 @@ 2009-28-09: Christian Ruppert <idl0r@gentoo.org> * src/eshowkw/eshowkw: Make eshowkw a bit more POSIX compliant when using /bin/sh, thanks to Daniel Pielmeier <billie@gentoo.org>. + Ignore comments when parsing arch.list, thanks to Fabian Groffen <grobian@gentoo.org>. + 2009-12-09: Christian Ruppert <idl0r@gentoo.org> * src/echangelog/echangelog: Fix bug 284657, thanks to Andrew Gaffney <agaffney@gentoo.org>. Cleanup VCS detection. diff --git a/src/eshowkw/eshowkw b/src/eshowkw/eshowkw index ae5f3d0..d5d3584 100644 --- a/src/eshowkw/eshowkw +++ b/src/eshowkw/eshowkw @@ -283,11 +283,16 @@ show_keyword_diagram() { echo -e "\033[0;0m:" echo - local archs= arch_length=0 arch= - archs=( $(< $(get_portage_dir )/profiles/arch.list ) ) - for arch in "${archs[@]}" ; do + local archs=() arch_length=0 arch= + while read arch + do + [[ -z "${arch}" ]] && continue + [[ "${arch:0:1}" == "#" ]] && continue [[ ${#arch} -gt ${arch_length} ]] && arch_length=${#arch} - done + + archs[${#archs[*]}]=$arch + done < "$(get_portage_dir)/profiles/arch.list" + local versions= pkgname= version_length=0 version= pkgname=$(basename $(readlink -f ./ ) ) |