* Enrico Weigelt <weig...@metux.de> schrieb: Sorry, forgot the attachement ;-o
-- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------
#!/bin/bash TREE=/usr/portage warn_eapi_missing() { echo "$1: missing EAPI= line" true } warn_eapi_unquoted() { echo "$1: EAPI= line not quoted" true } warn_eapi_deprecated() { echo "$1: EAPI $2 deprecated" true } check_eapi() { while read f ; do if ! grep "EAPI=" $f >/dev/null ; then warn_eapi_missing "$f" elif ! grep "EAPI=\"" $f >/dev/null ; then warn_eapi_unquoted "$f" elif grep -E "EAPI\=(0|\"0\")" $f >/dev/null; then warn_eapi_deprecated "$f" 0 elif grep -e "EAPI\=(1|\"1\")" $f >/dev/null; then warn_eapi_deprecated "$f" 1 # elif grep -E "EAPI\=(2|\"2\")" $f >/dev/null; then # warn_eapi_deprecated "$f" 2 # elif grep -E "EAPI\=(3|\"3\")" $f >/dev/null; then # warn_eapi_deprecated "$f" 3 # elif grep -E "EAPI\=(4|\"4\")" $f >/dev/null; then # warn_eapi_deprecated "$f" 4 else true fi done } find $TREE -name "*.ebuild" | check_eapi