mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-01 08:17:38 +00:00
bc511a64f6
Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
75 lines
2.3 KiB
Bash
Executable File
75 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
### make-info-dir - create info/dir, for systems without install-info
|
|
|
|
## Copyright (C) 2013-2017 Free Software Foundation, Inc.
|
|
|
|
## Author: Glenn Morris <rgm@gnu.org>
|
|
## Maintainer: emacs-devel@gnu.org
|
|
|
|
## This file is part of GNU Emacs.
|
|
|
|
## GNU Emacs 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, either version 3 of the License, or
|
|
## (at your option) any later version.
|
|
|
|
## GNU Emacs 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 GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
### Commentary:
|
|
|
|
## Generate info/dir, for systems without install-info.
|
|
## Expects to be called from top-level Emacs source directory.
|
|
|
|
## It only handles the case where info/dir is missing from the
|
|
## installation directory. It does not handle info/dir being present
|
|
## but missing some entries.
|
|
|
|
## Header contains non-printing characters, so this is more
|
|
## reliable than using awk.
|
|
cat <"${1?}" || exit
|
|
shift
|
|
|
|
exec "${AWK-awk}" '
|
|
function detexinfo() {
|
|
gsub(/@value{emacsname}/, "Emacs")
|
|
gsub(/@[^{]*\{/, "")
|
|
gsub(/}/, "")
|
|
}
|
|
BEGIN {
|
|
ntopics = 0
|
|
topic[ntopics++] = "Texinfo documentation system"
|
|
topic[ntopics++] = "Emacs"
|
|
topic[ntopics++] = "Emacs lisp"
|
|
topic[ntopics++] = "Emacs editing modes"
|
|
topic[ntopics++] = "Emacs network features"
|
|
topic[ntopics++] = "Emacs misc features"
|
|
topic[ntopics++] = "Emacs lisp libraries"
|
|
topic[ntopics] = "Unknown category"
|
|
}
|
|
/^@dircategory / {
|
|
sub(/^@dircategory /, "")
|
|
detexinfo()
|
|
for (dircat = 0; dircat < ntopics && topic[dircat] != $0; dircat++)
|
|
continue;
|
|
}
|
|
/^@direntry/, /^@end direntry/ {
|
|
# FIXME do not ignore w32 if OS is w32.
|
|
if ($0 !~ /^@/ && $0 !~ /w32/) {
|
|
detexinfo()
|
|
data[dircat] = data[dircat] $0 "\n"
|
|
}
|
|
}
|
|
END {
|
|
for (dircat = 0; dircat <= ntopics; dircat++)
|
|
if (data[dircat])
|
|
printf "\n%s\n%s", topic[dircat], data[dircat]
|
|
}
|
|
' "${@?}"
|