avoid double checks, and problems due to grep not liking to grep directories
authorFabian Groffen <grobian@gentoo.org>
Thu, 12 Mar 2009 21:02:04 +0000 (21:02 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 12 Mar 2009 21:02:04 +0000 (21:02 -0000)
svn path=/main/branches/prefix/; revision=13102

tarball.sh

index aa2e02823d7f2cc25c9b2b54f7548d91d4d67731..d0618e793181f57634e660927d62bab8534deb37 100755 (executable)
@@ -14,9 +14,13 @@ export TMP="/var/tmp"
 export V="$1"
 export DEST="${TMP}/${PKG}-${V}"
 
-./tabcheck.py `grep "#\!@PORTAGE_PYTHON@" bin/* | cut -d: -f1` `find ./ -type f -name '*.py'`
+./tabcheck.py $(
+       find ./ -name .svn -prune -o -type f ! -name '*.py' -print \
+               | xargs grep -l "#\!@PORTAGE_PYTHON@"
+       find ./ -name .svn -prune -o -type f -name '*.py' -print
+)
 
-if [ -e ${DEST} ]; then
+if [[ -e ${DEST} ]]; then
        echo EXISTS ALREADY
        exit 1
 fi