From cd07cc017cf7e60808a5c42da64492d57e8bd789 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Fri, 6 Jan 2017 15:21:19 +0100 Subject: added FREQ variable --- sitemap.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sitemap.sh') diff --git a/sitemap.sh b/sitemap.sh index 2782b40..56c33a2 100755 --- a/sitemap.sh +++ b/sitemap.sh @@ -3,6 +3,9 @@ # url configuration URL="https://mcmilk.de/" +# values: always hourly daily weekly monthly yearly never +FREQ="weekly" + # begin new sitemap exec 1> sitemap.xml @@ -13,16 +16,14 @@ 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" | \ +find . -type f "${OPTIONS[@]}" -printf "%TY-%Tm-%Td%p\n" | \ while read -r line; do - # TIME is ignored... DATE=${line:0:10} - TIME=${line:11:5} - FILE=${line:19} + FILE=${line:12} echo "" echo " ${URL}${FILE}" - echo " ${DATE}" - echo " weekly" + echo " $DATE" + echo " $FREQ" echo "" done -- cgit v1.2.3