From e69ddea011669a43c3f7d0cb712f88cff54b290b Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Fri, 6 Jan 2017 15:12:12 +0100 Subject: Added the Script. --- sitemap.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 sitemap.sh (limited to 'sitemap.sh') diff --git a/sitemap.sh b/sitemap.sh new file mode 100755 index 0000000..2782b40 --- /dev/null +++ b/sitemap.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# url configuration +URL="https://mcmilk.de/" + +# begin new sitemap +exec 1> sitemap.xml + +# print head +echo '' +echo '' +echo '' + +# print urls +IFS=$'\r\n' GLOBIGNORE='*' command eval "OPTIONS=($(cat $0.options))" +find . -type f "${OPTIONS[@]}" -printf "%TY-%Tm-%Td %TH:%TM %p\n" | \ +while read -r line; do + # TIME is ignored... + DATE=${line:0:10} + TIME=${line:11:5} + FILE=${line:19} + echo "" + echo " ${URL}${FILE}" + echo " ${DATE}" + echo " weekly" + echo "" +done + +# print foot +echo "" -- cgit v1.2.3