From patchwork Wed Jul 6 22:44:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wbx X-Patchwork-Id: 645641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rlG5z5GcZz9sCj for ; Thu, 7 Jul 2016 08:44:38 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 2842C100E2; Thu, 7 Jul 2016 00:44:34 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: by helium.openadk.org (Postfix, from userid 1000) id CAC00100E2; Thu, 7 Jul 2016 00:44:31 +0200 (CEST) MIME-Version: 1.0 To: devel@uclibc-ng.org X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 10f469f6ce1a0c14e4506c42e47e15aa83be2eef X-Git-Newrev: 12e9febc815ae88403c16fb7874af46b7d71efd2 Auto-Submitted: auto-generated Message-Id: <20160706224431.CAC00100E2@helium.openadk.org> Date: Thu, 7 Jul 2016 00:44:31 +0200 (CEST) From: wbx@helium.openadk.org (wbx) Subject: [uclibc-ng-devel] uClibc-ng - small C library for embedded systems branch master updated. v1.0.16-3-g12e9feb X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "uClibc-ng - small C library for embedded systems". The branch, master has been updated via 12e9febc815ae88403c16fb7874af46b7d71efd2 (commit) from 10f469f6ce1a0c14e4506c42e47e15aa83be2eef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 12e9febc815ae88403c16fb7874af46b7d71efd2 Author: Martin Thomas Date: Wed Jul 6 21:22:25 2016 +0200 The file list is at the beginning now Signed-off-by: Martin Thomas ----------------------------------------------------------------------- Summary of changes: extra/scripts/findC.pl | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) mode change 100644 => 100755 extra/scripts/findC.pl hooks/post-receive diff --git a/extra/scripts/findC.pl b/extra/scripts/findC.pl old mode 100644 new mode 100755 index 555584c..0fbae78 --- a/extra/scripts/findC.pl +++ b/extra/scripts/findC.pl @@ -16,8 +16,8 @@ my $files; my $encoding; my @copyright; my @copyrightout; -my @ctext; my @uniqcpr; +my @output; my $i; $encoding = ":encoding(UTF-8)"; @@ -28,7 +28,7 @@ $directory="./"; $header = "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\n"; $header .= "Upstream-Name: uclibc-ng\n"; $header .= 'Upstream-Contact: Waldemar Brodkorb '."\n"; -$header .= "Source: git://uclibc-ng.org/git/uclibc-ng\n"; +$header .= "Source: git://uclibc-ng.org/git/uclibc-ng\n\n"; # my $emailregex='\b[[:alnum:]._%+-]+@[[:alnum:].-]+.[[:alpha:]]{2,6}\b'; @@ -50,9 +50,9 @@ foreach $file (@files) { chomp $row; if ($row =~ m/[Cc]opyright / ) { - $row =~ s/^[\s\/\*#!;.\"\\]*//; - $row =~ s/\s+$//; - push @copyright, { file => $file, text => $row}; + $row =~ s/^[\s\/\*#!;.\"\\]*//; #remove leading + $row =~ s/\s+$//; #remove trailing + push @copyright, { file => $file, raw => $row}; last; } } @@ -60,24 +60,30 @@ foreach $file (@files) { } } -@copyrightout = sort { $a->{text} cmp $b->{text} } @copyright; +#sort raw +@copyrightout = sort { $a->{raw} cmp $b->{raw} } @copyright; $tmp=""; -$i=0; +$i=-1; foreach (@copyrightout) { - if ( $tmp eq $_->{'text'} ) + if ( $tmp eq $_->{'raw'} ) { - print " $_->{'file'}\n"; + $output[$i]{"files"} .= "\n"." $_->{'file'}"; } else { - print "\n"; - print $header; - print "Copyright: $_->{'text'}\n"; - print "License: GNU Lesser General Public License 2.1\n"; - print "Files: $_->{'file'}\n"; + ++$i; + $output[$i]{"header"} .= "Copyright: $_->{'raw'}\n"; + $output[$i]{"header"} .= "License: GNU Lesser General Public License 2.1\n"; + $output[$i]{"files"} .= "Files: ".$_->{'file'}; } - $tmp=$_->{'text'}; - ++$i; + $tmp=$_->{'raw'}; } +print "$header"; +$i=0; +foreach (@output) { + print "$output[$i]->{'files'}\n"; + print "$output[$i]->{'header'}\n"; + ++$i; +}