3 # Kernel Docs ¤Î¥Ð¡¼¥¸¥ç¥ó¾ðÊó¥ê¥¹¥È¤ò,
4 # ¥«¡¼¥Í¥ë¥Ñ¥Ã¥Á¤ò»È¤Ã¤Æ¹¹¿·¤¹¤ë¥¹¥¯¥ê¥×¥È
6 # ¥Ð¥°: ʸ½ñ¤¬¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¤Ï̤Âбþ(^^;
10 # ¤Ò¤È¤Ä¤á¤Î°ú¿ô: Kernel Docs ¤Î¥Ð¡¼¥¸¥ç¥ó¾ðÊó¥ê¥¹¥È
11 # ¤Õ¤¿¤Ä¤á¤Î°ú¿ô: bzip2 ¤Ê¥«¡¼¥Í¥ë¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë
15 # $ ./upd-kdoc-list.pl ../lists/kdoc-2.6-version.list \
16 # ~/src/patch-2.6.2.bz2 >../lists/kdoc-2.6-version.list.new
18 # $ mv kdoc-2.6-version.list.new kdoc-2.6-version.list
23 if (@ARGV < 2) {die "$0 oldlist kernel-patch\n"};
28 $NEWKVER = basename($ARGV[1], '.bz2');
29 $NEWKVER =~ s/^patch-//;
31 unless (-f $OLDLIST) {die "$OLDLIST does not exist.\n"};
32 unless (-f $K_PATCH) {die "$K_PATCH does not exist.\n"};
34 unless ($NEWKVER =~ /^[23]\.([0246])\.([1-9][0-9]?)/) {
35 die "illegal version number.\n";
43 if (/^# latest versions of kernel docs, as of (2\.([246])\.([0-9][0-9]?))/) {
47 unless ($OLDPATCHLEVEL == $NEWPATCHLEVEL &&
48 ++$OLDSUBLEBEL == $NEWSUBLEVEL) {
49 die "illegal version number.\n";
53 ($VER, $FILE) = split;
58 print STDERR "Current kdoc version is $OLDKVER\n";
59 print STDERR "updating kdoc to $NEWKVER...\n";
61 # ¤È¤ê¤¢¤¨¤º bzip2 ¤Ê¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë¤Ë·è¤áÂǤÁ.
63 open KP, "bzip2 -dc $K_PATCH |";
65 next unless ((/^\+\+\+ b\/Documentation\/([^ \t\n]*)/) or
66 (/^\+\+\+ linux-$NEWKVER\/Documentation\/([^ \t]*)/) or
67 (/^\+\+\+ linux\/Documentation\/([^ \t]*)/));
68 print STDERR "$1 updated!\n";
72 print "# latest versions of kernel docs, as of $NEWKVER\n";
73 foreach $k (sort keys %FVER){
74 printf "%-7s%s\n", $FVER{$k}, $k;