summaryrefslogtreecommitdiff
path: root/sitemap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sitemap.sh')
-rwxr-xr-xsitemap.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/sitemap.sh b/sitemap.sh
index a360d9b..17ad69b 100755
--- a/sitemap.sh
+++ b/sitemap.sh
@@ -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"