From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9009 invoked by alias); 26 May 2012 00:12:51 -0000 Received: (qmail 8997 invoked by uid 22791); 26 May 2012 00:12:43 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 May 2012 00:12:26 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4Q0CMKP006474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 May 2012 20:12:22 -0400 Received: from psique (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4Q0CJ56013477; Fri, 25 May 2012 20:12:20 -0400 From: Sergio Durigan Junior To: "Pierre Muller" Cc: Subject: Re: [RFA] Add scripts to generate ARI web pages to gdb/contrib/ari directory References: <001201cd3547$377188b0$a6549a10$@muller@ics-cnrs.unistra.fr> X-URL: http://www.redhat.com Date: Sat, 26 May 2012 00:12:00 -0000 In-Reply-To: <001201cd3547$377188b0$a6549a10$@muller@ics-cnrs.unistra.fr> (Pierre Muller's message of "Sat, 19 May 2012 00:40:24 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00978.txt.bz2 On Friday, May 18 2012, Pierre Muller wrote: > Here is a RFA for inclusion of scripts to gdb/contrib/ari. As Jan pointed out, the patch does not apply. I am assuming that, if you are asking for opinions, then you are volunteering to fix the ARI scripts :-). Here are my opinions. Thanks a lot for doing this! > Index: contrib/ari/create-web-ari-in-src.sh > =================================================================== > RCS file: contrib/ari/create-web-ari-in-src.sh > diff -N contrib/ari/create-web-ari-in-src.sh > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ contrib/ari/create-web-ari-in-src.sh 18 May 2012 22:31:42 -0000 Is this script called in some cronjob, or is it intended to be called directly by the user? I don't see it being called anywhere in the sources. If it is called from a cronjob, then maybe it's worth providing an example of a simple crontab script which would work for this purpose. Also, if it is supposed to be called by the user, then I think it should accept command line arguments. > @@ -0,0 +1,68 @@ > +#! /bin/sh > + > +# GDB script to create web ARI page directly from within gdb/ari directory. > +# > +# Copyright (C) 2012 Free Software Foundation, Inc. Is this a new script? If not, I believe the copyright notice should include the previous years of existence. > +# This file is part of GDB. > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see .+ > +set -x > + > +# Determine directory of current script. > +scriptpath=`dirname $0` Since we are now putting the scripts in the main tree, which IMO is an incentive for everyone to run them and check the results, I believe we cannot always assume that certain programs are available at the user's machine. For this reason, maybe it's good to check if the executables (like `dirname') being used in these sources actually exist? > Index: contrib/ari/gdb_ari.sh > =================================================================== > RCS file: contrib/ari/gdb_ari.sh > diff -N contrib/ari/gdb_ari.sh > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ contrib/ari/gdb_ari.sh 18 May 2012 22:31:42 -0000 > +awk -- ' > +BEGIN { What do you think of creating a new file which would contain this giant awk script? I see there are many "sections" in this script, so maybe we could even separate those script into logical files and use multiple `-f FILE' arguments to awk. But I guess only putting this huge script into a separate file is enough for now... Thanks, -- Sergio