aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2012-02-03 23:47:23 +0100
committerUlrich Müller <ulm@gentoo.org>2012-02-03 23:51:19 +0100
commited4fa2c54dffce108bfd0e2d485e4c83c32d6462 (patch)
tree08075d0a4b28c116716dd1e5c4d41153309b2e7b /check_eclasses_eapis.sh
parentp-i-e.py: write sync time in index.html. (diff)
downloadqa-scripts-ed4fa2c54dffce108bfd0e2d485e4c83c32d6462.tar.gz
qa-scripts-ed4fa2c54dffce108bfd0e2d485e4c83c32d6462.tar.bz2
qa-scripts-ed4fa2c54dffce108bfd0e2d485e4c83c32d6462.zip
check_eclasses_eapis.sh: Fix awk syntax.
This avoids false positives for eclasses whose name is a substring of another eclass's name. (Same for EAPIs.)
Diffstat (limited to 'check_eclasses_eapis.sh')
-rwxr-xr-xcheck_eclasses_eapis.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/check_eclasses_eapis.sh b/check_eclasses_eapis.sh
index 380b131..a5eb736 100755
--- a/check_eclasses_eapis.sh
+++ b/check_eclasses_eapis.sh
@@ -25,11 +25,11 @@ for x in ${ECLASSES}; do
echo "Processing eclass \"${x}\""
rm -rf "${x}"
mkdir "${x}"
- awk -F'=' '$3 ~ /'"${x%.eclass}"'[ "]/ {print $1" "$2}' "${TMPEAPIS}" > "${TMPECLASS}"
+ awk -F'=' '$3 ~ /[ "]'"${x%.eclass}"'[ "]/ {print $1" "$2}' "${TMPEAPIS}" > "${TMPECLASS}"
pushd "${x}" > /dev/null
echo "Overall statistic for eclass \"${x}\":" > "STATS.txt"
for y in ${KNOWN_EAPIS}; do
- awk -F ' ' '$3 ~ /'"${y}"'/ {print $1}' "${TMPECLASS}" > "${y}.txt"
+ awk -F ' ' '$3 ~ /"'"${y}"'"/ {print $1}' "${TMPECLASS}" > "${y}.txt"
tmpval=$(wc -l "${y}.txt" |cut -d' ' -f1)
echo "EAPI=${y} count: ${tmpval}" >> "STATS.txt"
done