Files
android_kernel_samsung_ot8/scripts/split-man.pl
Bo Ye 425c4a3572 [ALPS06486924] ACK: Merge android-4.19-stable into alps-mp-s0.mp1
Target:
   android-4.19-stable "011b73c995f35959b39ccde045addbc1862fa3e6
   Merge 4.19.191 into android-4.19-stable"

Version change from 4.19.188 to 4.19.191

MTK-Commit-Id: c8384f99d5a155550b3c0707800ea3d1d83f9ee3

Feature: Kernel SI Operation
CR-Id: ALPS06486924
Signed-off-by: Bo Ye <bo.ye@mediatek.com>
Change-Id: Ic51822fa66c2d94e5f60b2e65a65153ade20c228
2022-01-20 11:18:48 +08:00

29 lines
604 B
Perl
Executable File

#!/usr/bin/env perl
# SPDX-License-Identifier: GPL-2.0
#
# Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
#
# Produce manpages from kernel-doc.
# See Documentation/doc-guide/kernel-doc.rst for instructions
if ($#ARGV < 0) {
die "where do I put the results?\n";
}
mkdir $ARGV[0],0777;
$state = 0;
while (<STDIN>) {
if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) {
if ($state == 1) { close OUT }
$state = 1;
$fn = "$ARGV[0]/$1.9";
print STDERR "Creating $fn\n";
open OUT, ">$fn" or die "can't open $fn: $!\n";
print OUT $_;
} elsif ($state != 0) {
print OUT $_;
}
}
close OUT;