diff options
author | eudoxia <uplink@distress.network> | 2022-02-04 16:05:22 -0500 |
---|---|---|
committer | eudoxia <uplink@distress.network> | 2022-02-04 16:05:22 -0500 |
commit | 9e59767d4b952cf74804552f7598e167c35cbe61 (patch) | |
tree | 84839e9eac91c8f8824ebd8cfa4340575ad9adbe /sitemap.sh | |
parent | feea7384f3e197681745c2bfbbf4ae778aa0df43 (diff) |
linting
Diffstat (limited to 'sitemap.sh')
-rwxr-xr-x | sitemap.sh | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -25,15 +25,15 @@ urlencode() ( echo '<?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">' > $2 +xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' > "$2" -echo "$(find -L $1 -type d | sort | sed -e 's;^\./;;' -e '\;/\(.git\|css\|error\|favicon\|fonts\|js\|media\);d' -e 's;$;/;')" | \ +find -L "$1" -type d | sort | sed -e 's;^\./;;' -e '\;/\(.git\|css\|error\|favicon\|fonts\|js\|media\);d' -e 's;$;/;' | \ while IFS='' read -r data ; do - DATE=$(grep "last-modified" ${data}/index.html | cut -f 4 -d \" | sed 's/ /T/' ) ; + DATE=$(grep "last-modified" "${data}/index.html" | cut -f 4 -d \" | sed 's/ /T/' ) ; echo "$data" | urlencode | sed -e 's;^;<url><loc>https://;' -e "s;$;</loc><lastmod>${DATE}</lastmod></url>;" ; printf "\n" ; -done >> $2 +done >> "$2" -echo '</urlset>' >> $2 +echo '</urlset>' >> "$2" -cat $2 +cat "$2" |