From patchwork Mon Feb 28 11:54:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 84822 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id F04C3B7120 for ; Mon, 28 Feb 2011 22:54:24 +1100 (EST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by ozlabs.org (Postfix) with ESMTP id 372DCB6EFE for ; Mon, 28 Feb 2011 22:54:23 +1100 (EST) Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Pu1gD-0002j6-Eu; Mon, 28 Feb 2011 11:54:21 +0000 Received: from [187.126.165.64] (helo=feioso) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Pu1gD-0008Tk-20; Mon, 28 Feb 2011 11:54:21 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by feioso (Postfix) with ESMTP id 46051416EA; Mon, 28 Feb 2011 08:54:18 -0300 (BRT) Subject: [PATCH] Get rid of some code duplication in parsemail-batch.sh. To: patchwork@lists.ozlabs.org From: Guilherme Salgado Date: Mon, 28 Feb 2011 08:54:18 -0300 Message-ID: <20110228115401.9401.7518.stgit@localhost6.localdomain6> In-Reply-To: <20110218192739.7482.67541.stgit@localhost6.localdomain6> References: <20110218192739.7482.67541.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: Jeremy Kerr , patches@linaro.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org It now uses parsemail.sh instead of parsemail.py as the former sets the required environment variables that were being set in parsemail-batch.sh. Signed-off-by: Guilherme Salgado --- apps/patchwork/bin/parsemail-batch.sh | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/patchwork/bin/parsemail-batch.sh b/apps/patchwork/bin/parsemail-batch.sh index d786022..31ef4f0 100755 --- a/apps/patchwork/bin/parsemail-batch.sh +++ b/apps/patchwork/bin/parsemail-batch.sh @@ -19,7 +19,7 @@ # along with Patchwork; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -PATCHWORK_BASE="/srv/patchwork" +PATCHWORK_BINDIR=`dirname $0` if [ $# -ne 1 ] then @@ -41,11 +41,5 @@ ls -1rt "$mail_dir" | while read line; do echo $line - PYTHONPATH="$PATCHWORK_BASE/apps":"$PATCHWORK_BASE/lib/python" \ - DJANGO_SETTINGS_MODULE=settings \ - "$PATCHWORK_BASE/apps/patchwork/bin/parsemail.py" < \ - "$mail_dir/$line" + $PATCHWORK_BINDIR/parsemail.sh < "$mail_dir/$line" done - - -