coccinelle release 0.2.5
[bpt/coccinelle.git] / scripts / extract_c_and_res.pl
index 4ef3f64..c8352a8 100755 (executable)
@@ -1,3 +1,25 @@
+# Copyright 2010, INRIA, University of Copenhagen
+# Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
+# This file is part of Coccinelle.
+#
+# Coccinelle 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, according to version 2 of the License.
+#
+# Coccinelle 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 Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+#
+# The authors reserve the right to distribute this or future versions of
+# Coccinelle under other licenses.
+
+
 #!/usr/bin/perl -w
 use strict;
 
@@ -97,11 +119,11 @@ foreach my $f (@files) {
   }                         
   die "PB: one of the file already exist: $base" if (-e "$target_dir/$base");
 
-  `git-cat-file blob $commit_old:$f > $target_dir/$base`;
-  `git-cat-file blob $commit_new:$f > $target_dir/$res`;
+  `git cat-file blob $commit_old:$f > $target_dir/$base`;
+  `git cat-file blob $commit_new:$f > $target_dir/$res`;
 
-  `git-cat-file blob $commit_old:$f > $old_dir/$base`;
-  `git-cat-file blob $commit_new:$f > $new_dir/$base`;
+  `git cat-file blob $commit_old:$f > $old_dir/$base`;
+  `git cat-file blob $commit_new:$f > $new_dir/$base`;
 
   $kerneldir_of_file->{$base} = `dirname $f`;
   chomp $kerneldir_of_file->{$base};
@@ -152,13 +174,13 @@ foreach my $f (@driverheaders_in_include) {
     my $dir = `dirname $f`;
     chomp $dir;
     `mkdir -p $target_dir/$dir`;
-    `git-cat-file blob $commit_old:$f > $target_dir/$f`;
-    `git-cat-file blob $commit_new:$f > $target_dir/$f.res`;
+    `git cat-file blob $commit_old:$f > $target_dir/$f`;
+    `git cat-file blob $commit_new:$f > $target_dir/$f.res`;
 
     `mkdir -p $old_dir/$dir`;
     `mkdir -p $new_dir/$dir`;
-    `git-cat-file blob $commit_old:$f > $old_dir/$f`;
-    `git-cat-file blob $commit_new:$f > $new_dir/$f`;
+    `git cat-file blob $commit_old:$f > $old_dir/$f`;
+    `git cat-file blob $commit_new:$f > $new_dir/$f`;
     
   }
 }
@@ -183,7 +205,7 @@ foreach my $line (@linuxheaders) {
       my $dir = `dirname $f`;
       chomp $dir;
       `mkdir -p $target_dir/include/$dir`;
-      `git-cat-file blob $commit_old:include/$f > $target_dir/include/$f`;
+      `git cat-file blob $commit_old:include/$f > $target_dir/include/$f`;
     }
   } else { pr2 "pb regexp: $line"; }
 }
@@ -226,6 +248,6 @@ foreach my $h (keys %{$hfiles}) {
     pr2 "BUT I CONTINUE, but may have more .failed in the end";
     pr2 "-------------------------------------";
   } else {
-    `git-cat-file blob $commit_old:$h > $target_dir/$base`;
+    `git cat-file blob $commit_old:$h > $target_dir/$base`;
   }
 }