Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 99772 invoked from network); 28 Apr 2006 04:30:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Apr 2006 04:30:39 -0000 Received: (qmail 43330 invoked by uid 500); 28 Apr 2006 04:30:33 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 43286 invoked by uid 500); 28 Apr 2006 04:30:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 43271 invoked by uid 99); 28 Apr 2006 04:30:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2006 21:30:33 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.201.228] (HELO web30215.mail.mud.yahoo.com) (68.142.201.228) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 27 Apr 2006 21:30:31 -0700 Received: (qmail 57604 invoked by uid 60001); 28 Apr 2006 04:30:07 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nbSDRmw9DxaFafxPp8vHfI4Gux7dPu3LNpdW1bIo/vAbCqoA4nn9sK286qUOlGklDz0pmFSlfhE0X3ru9LFX4z8J0FU4WNWNeeAAXi6iNFLUkI0xUADuLQCIYHzGJVzaiB94Iv0ZmGvxF/n5tYLRd93UO5vxRCHA/jgW6Oo9jys= ; Message-ID: <20060428043007.57598.qmail@web30215.mail.mud.yahoo.com> Date: Thu, 27 Apr 2006 21:30:07 -0700 (PDT) From: Ninju Bohra Reply-To: Ninju Bohra Subject: Re: Converting a shell script part to ant target To: Ant Users List In-Reply-To: <863A0759A3243C4DAB49851540F9935D0CE3F7@blr-m2-msg.wipro.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1505639539-1146198607=:56943" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1505639539-1146198607=:56943 Content-Type: text/plain; charset=us-ascii Interesting challenge, Try looking at the type with a selector to restrict the files to those that contain your specified text. You can follow that with a with a setonempty attribute to control the defining a property only if any files containing your desired text is found Then call a target to do the emailing and use an if attribute to check if the attribute is set. Good Luck, Ninju >> -----Original Message----- >> From: pritesh.saharey@wipro.com [mailto:pritesh.saharey@wipro.com] >> Sent: Thursday, April 27, 2006 2:48 AM >> To: user@ant.apache.org >> Subject: Converting a shell script part to ant target >> >> >> Hi, >> Can anyone help me in converting this piece of code from >> shell script to an ant target? >> >> >> //-------------------------------------------- >> >> >> # 12 : Check errors at build.msg and the logs >> >> >> echo "Check there any errors " >> cd $IMF/build >> rm -rf /usr/local/error.txt >> #grep " Error" *.log *.msg > /usr/local/error.txt grep " >> Failed" *.log *.msg >> /usr/local/error.txt >> >> >> count=`cat /usr/local/error.txt|wc -w` >> echo $count >> >> >> if [ ``$count'' = ''0'' ] >> then >> status=Pass >> else >> status=Fail >> fi >> >> >> sleep 2 >> >> >> # 13 : Create mail file >> echo "Runnning create mail script" >> echo "To:$maillist" > /usr/local/mail.txt echo "Subject:Build >> Summary :: $product/$VER-$RELN/$status" >> >>>> /usr/local/mail.txt >>>> >> //---------------------------------------------- >> >> >> I will be thankful to you. >> >> >> Regards >> Pritesh >> >> >> >> >> >> >> >> >> >> +91 80 30298143(O) >> >> >> >> >> >> >> >> The information contained in this electronic message and any >> attachments to this message are intended for the exclusive >> use of the addressee(s) and may contain proprietary, >> confidential or privileged information. If you are not the >> intended recipient, you should not disseminate, distribute or >> copy this e-mail. Please notify the sender immediately and >> destroy all copies of this message and any attachments. >> >> >> WARNING: Computer viruses can be transmitted via email. The >> recipient should check this email and any attachments for the >> presence of viruses. The company accepts no liability for any >> damage caused by any virus transmitted by this email. >> >> >> www.wipro.com >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > -- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --0-1505639539-1146198607=:56943--