1 |
commit: dfd5f19a16fcb9b7d0f31535f7ddc47ed2b3cce5 |
2 |
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 17:30:14 2011 +0000 |
4 |
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 17:30:14 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=dfd5f19a |
7 |
|
8 |
Add some sanity checks and allow specification of workdir as argument ot script. |
9 |
|
10 |
--- |
11 |
check_eclasses_eapis.sh | 6 ++++++ |
12 |
1 files changed, 6 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/check_eclasses_eapis.sh b/check_eclasses_eapis.sh |
15 |
index ef25d5d..aa77dfa 100755 |
16 |
--- a/check_eclasses_eapis.sh |
17 |
+++ b/check_eclasses_eapis.sh |
18 |
@@ -2,6 +2,10 @@ |
19 |
# Created by Tomáš Chvátal <scarabeus@g.o> |
20 |
# License WTFPL-2.0 |
21 |
|
22 |
+[[ -z ${1} ]] && DIR="${1}" || DIR=$(pwd) |
23 |
+ |
24 |
+[[ $(type pquery 2> /dev/null) ]] || exit 1 |
25 |
+ |
26 |
KNOWN_EAPIS="0 1 2 3 4" |
27 |
TMPEAPIS="/tmp/$(basename $0).global.$$.tmp" |
28 |
TMPECLASS="/tmp/$(basename $0).eclass.$$.tmp" |
29 |
@@ -10,6 +14,7 @@ ECLASSES=$(echo *.eclass) |
30 |
popd > /dev/null |
31 |
pquery --attr eapi --attr inherited --raw --all --repo portdir > "${TMPEAPIS}" |
32 |
|
33 |
+pushd ${DIR} > /dev/null |
34 |
rm -rf *.eclass |
35 |
for x in ${ECLASSES}; do |
36 |
echo "Processing eclass \"${x}\"" |
37 |
@@ -25,6 +30,7 @@ for x in ${ECLASSES}; do |
38 |
done |
39 |
popd > /dev/null |
40 |
done |
41 |
+popd > /dev/null |
42 |
|
43 |
rm ${TMPEAPIS} |
44 |
rm ${TMPECLASS} |