diff options
author | 2013-09-08 12:07:24 +0200 | |
---|---|---|
committer | 2013-09-08 12:07:24 +0200 | |
commit | 4878c5e34325e563e75a97c0e3a20d12b58a58c6 (patch) | |
tree | 52c861ebb21949306ea17f21af074d3f781ad670 /keyword-generation.sh | |
parent | Cleanup list of obsolete eclasses. (diff) | |
download | ebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.tar.gz ebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.tar.bz2 ebuild-mode-4878c5e34325e563e75a97c0e3a20d12b58a58c6.zip |
keyword-generation.sh: Sort list of eclasses.
* keyword-generation.sh (ECLASSES): Strip filename suffix and sort
the list of eclasses.
Diffstat (limited to 'keyword-generation.sh')
-rw-r--r-- | keyword-generation.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/keyword-generation.sh b/keyword-generation.sh index 8718e46..373fc69 100644 --- a/keyword-generation.sh +++ b/keyword-generation.sh @@ -10,7 +10,7 @@ TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)" ECLASSDIR="$(portageq portdir)/eclass" -ECLASSES=$(cd ${ECLASSDIR}; ls *.eclass) +ECLASSES=$(cd ${ECLASSDIR}; ls *.eclass | sed 's/\.eclass$//' | LC_ALL=C sort) # Obsolete eclasses OBSOLETE="bash-completion gems leechcraft ruby x-modular" @@ -26,11 +26,11 @@ has() { echo "Output in ${TMPFILE}" for eclass in ${ECLASSES}; do - has ${eclass%.eclass} ${OBSOLETE} && continue - grep -q "^# @DEAD$" "${ECLASSDIR}/${eclass}" && continue + has ${eclass} ${OBSOLETE} && continue + file="${ECLASSDIR}/${eclass}.eclass" + grep -q "^# @DEAD$" "${file}" && continue - functions=$(env -i bash -c \ - ". ${ECLASSDIR}/${eclass}; declare -F" 2>/dev/null \ + functions=$(env -i bash -c ". ${file}; declare -F" 2>/dev/null \ | sed 's/.*[[:space:]]//;/^_/d;s/.*/"&"/') [[ -z ${functions} ]] && continue |