dont break feeds while site is building
This commit is contained in:
parent
9533dba5ef
commit
8840365b0d
1 changed files with 5 additions and 7 deletions
12
xfwc
12
xfwc
|
@ -2,7 +2,7 @@
|
|||
|
||||
ABSURL="https://xfnw.ttm.sh/xfwc"
|
||||
|
||||
cat <<EOF > feed.rss
|
||||
cat <<EOF > feed.rss.new
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
|
||||
|
@ -16,10 +16,6 @@ EOF
|
|||
|
||||
TOTAL=$(ls src | wc -w)
|
||||
|
||||
rm index.html
|
||||
|
||||
ln -s $TOTAL.html index.html
|
||||
|
||||
TOTAL=$(( TOTAL ))
|
||||
NUM=$(( TOTAL ))
|
||||
for fn in $(ls -t src); do
|
||||
|
@ -33,7 +29,7 @@ echo "
|
|||
<link>$ABSURL/$NEWF</link>
|
||||
<description>image #$NUM</description>
|
||||
</item>
|
||||
" >> feed.rss
|
||||
" >> feed.rss.new
|
||||
|
||||
sed "s/<!-- COMIC -->/<img class='comic' alt='$TITLE' title='$TITLE' src='src\/$fn'\/>/; s/XFSSTITLE/$TITLE/g; s/RANDOM/"$(( ( RANDOM % TOTAL ) + 1 ))"/; s/LAST/$TOTAL/" template/page.html > $NEWF
|
||||
|
||||
|
@ -46,9 +42,11 @@ NUM=$(( NUM - 1 ))
|
|||
|
||||
done
|
||||
|
||||
cat <<EOF >> feed.rss
|
||||
cat <<EOF >> feed.rss.new
|
||||
</channel>
|
||||
</rss>
|
||||
EOF
|
||||
|
||||
ln -s $TOTAL.html index.html
|
||||
mv feed.rss.new feed.rss
|
||||
|
||||
|
|
Loading…
Reference in a new issue