[Lemon-commits] [lemon_svn] alpar: r2886 - hugo/trunk/scripts
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 21:51:02 CET 2006
Author: alpar
Date: Thu Aug 10 12:11:07 2006
New Revision: 2886
Added:
hugo/trunk/scripts/update-copyright-header (contents, props changed)
Log:
This script creates/updates the copyright header of a source file
Added: hugo/trunk/scripts/update-copyright-header
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/update-copyright-header Thu Aug 10 12:11:07 2006
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+FILE_NAME=$1
+TMP_FILE=`mktemp`
+YEAR='2003-2006'
+
+(echo "/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) "$YEAR"
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided \"AS IS\" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+"
+awk 'BEGIN { pm=0; }
+ pm==3 { print }
+ /\/\* / && pm==0 { pm=1;}
+ /[^:blank:]/ && (pm==0 || pm==2) { pm=3; print;}
+ /\*\// && pm==1 { pm=2;}
+ ' $1
+) >$TMP_FILE
+rm $FILE_NAME
+mv $TMP_FILE $FILE_NAME
More information about the Lemon-commits
mailing list