X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fscript%2Ffix_modeline.pl;fp=src%2Fceph%2Fsrc%2Fscript%2Ffix_modeline.pl;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=8eadde9b54e5671e177b894e6d621e7e49ba462b;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/script/fix_modeline.pl b/src/ceph/src/script/fix_modeline.pl deleted file mode 100755 index 8eadde9..0000000 --- a/src/ceph/src/script/fix_modeline.pl +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/perl - -use strict; -my $fn = shift @ARGV; -my $old = `cat $fn`; -my $header = `cat doc/modeline.txt`; - -# strip existing modeline -my $new = $old; -$new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs -$new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim; -$new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs -$new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim; -$new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs -$new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim; - -# add correct header -$new = $header . $new; - -if ($new ne $old) { - print "$fn\n"; - open(O, ">$fn.new"); - print O $new; - close O; - system "diff $fn $fn.new"; - rename "$fn.new", $fn; - #unlink "$fn.new"; -} -