From 630967680f506ca0c833cd109249a0dee45bb2ad Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 27 Mar 2020 23:04:46 +0900 Subject: [PATCH] Move sitemap XML files into their own folder, add to .gitignore --- .gitignore | 1 + sitemap => sitemap-update | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore rename sitemap => sitemap-update (98%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..cf813d1f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +sitemap diff --git a/sitemap b/sitemap-update similarity index 98% rename from sitemap rename to sitemap-update index 2c9d3588f..a21963f57 100755 --- a/sitemap +++ b/sitemap-update @@ -27,7 +27,7 @@ BLOCK_HASH=$(curl -s https://mempool.space/electrs/mainnet/block-height/${BLOCK_ BLOCK=$(curl -s https://mempool.space/electrs/mainnet/block/${BLOCK_HASH}) BLOCK_TIMESTAMP=$(echo "${BLOCK}"|sed -e 's/.*timestamp.://' -e 's/,.*//') -SITEMAP_FILE=$(printf "sitemap-%05d.xml" "${FILE}") +SITEMAP_FILE=$(printf "sitemap/%05d.xml" "${FILE}") SITEMAP_LASTMOD=$(date -r "${BLOCK_TIMESTAMP}" +"%Y-%m-%dT%H:%M:%SZ") if [ ! -f "${SITEMAP_FILE}" ] || [ "${BLOCK_HEIGHT}" -gt $(($BLOCK_TIP_HEIGHT - 2000)) ];then