code consistency with atom.sh

This commit is contained in:
prx 2021-09-29 21:21:50 +02:00
parent d1d6946dd0
commit f0e9334cb9
1 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@ set -e
usage()
{
printf "usage $0 <domain.tld> <site_directory> %s\n"
echo "usage $0 <domain.tld> <site_directory>"
exit 1
}
@ -14,12 +14,14 @@ ndd="$1"
# sitemap header
printf '%s\n' \
'<?xml version="1.0" encoding="UTF-8"?>
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
EOF
# list all pages in site_directory and print last mod time
cd "$2"
@ -30,6 +32,6 @@ do
"$(date -r $(stat -f %m ${l}) +%Y-%m-%d)"
done
printf '%s' '</urlset>'
echo "</urlset>"
exit