Move sitemap XML files into their own folder, add to .gitignore

This commit is contained in:
wiz 2020-03-27 23:04:46 +09:00
parent f7381a88e5
commit 630967680f
No known key found for this signature in database
GPG Key ID: A394E332255A6173
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
sitemap

View File

@ -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