On Thu, Apr 07, 2011 at 09:02:11AM +1000, James C. McPherson wrote: > On 7/04/11 07:09 AM, Will Fiveash wrote: > >While working on a project that has touched a lot of existing files I'm > >seeing a lot of these warnings from hg cddlchk: > > > >usr/src/lib/libgss/g_rel_buffer.c: 5: Error: Invalid line in CDDL block: > > should be > > 'Common Development and Distribution License (the "License").' > > is > > 'Common Development and Distribution License, Version 1.0 only' > > > >Is there a tool I can use on these files to fix this up instead of doing > >it by hand? > > sed? > > sed -e"s/, Version 1.0 only/ (the \"License\")./" < $file > $file.new > mv $file.new $file
Nope. Here's the old CDDL: /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ Here's the new one: /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ I want a tool I can feed a list of files to and have it identify and fix all the broken CDDLs. -- Will Fiveash Oracle http://opensolaris.org/os/project/kerberos/ Sent using mutt, a sweet, text based e-mail app <http://www.mutt.org/> _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org