3
###############################################################################
4
# This is the Ubuntu manpage repository generator and interface.
6
# Copyright (C) 2008 Canonical Ltd.
8
# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
9
# based on a framework by Kees Cook <kees@ubuntu.com>.
11
# This program is free software: you can redistribute it and/or modify
12
# it under the terms of the GNU General Public License as published by
13
# the Free Software Foundation, either version 3 of the License, or
14
# (at your option) any later version.
16
# This program is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
# GNU General Public License for more details.
21
# You should have received a copy of the GNU General Public License
22
# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
# On Debian-based systems, the complete text of the GNU General Public
25
# License can be found in /usr/share/common-licenses/GPL-3
26
###############################################################################
29
# Generate sitemaps per sitemaps.org for google.com
33
printf "%s\n" "INFO: Making sitemaps"
36
find manpages/ -type f -name "*.html" | xargs -i printf "%s\n" "<url><loc>$SITE/{}</loc></url>" | split -l 50000 - manpages/sitemap_
38
sitemaps=`ls manpages/sitemap_??`
39
for i in $sitemaps; do
40
printf "%s\n" "<?xml version='1.0' encoding='UTF-8'?>" > $i.xml
41
printf "%s\n" "<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>" >> $i.xml
43
printf "%s\n" "</urlset>" >> "$i.xml"