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"
|
ABSURL="https://xfnw.ttm.sh/xfwc"
|
||||||
|
|
||||||
cat <<EOF > feed.rss
|
cat <<EOF > feed.rss.new
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<rss version="2.0">
|
<rss version="2.0">
|
||||||
|
|
||||||
|
@ -16,10 +16,6 @@ EOF
|
||||||
|
|
||||||
TOTAL=$(ls src | wc -w)
|
TOTAL=$(ls src | wc -w)
|
||||||
|
|
||||||
rm index.html
|
|
||||||
|
|
||||||
ln -s $TOTAL.html index.html
|
|
||||||
|
|
||||||
TOTAL=$(( TOTAL ))
|
TOTAL=$(( TOTAL ))
|
||||||
NUM=$(( TOTAL ))
|
NUM=$(( TOTAL ))
|
||||||
for fn in $(ls -t src); do
|
for fn in $(ls -t src); do
|
||||||
|
@ -33,7 +29,7 @@ echo "
|
||||||
<link>$ABSURL/$NEWF</link>
|
<link>$ABSURL/$NEWF</link>
|
||||||
<description>image #$NUM</description>
|
<description>image #$NUM</description>
|
||||||
</item>
|
</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
|
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
|
done
|
||||||
|
|
||||||
cat <<EOF >> feed.rss
|
cat <<EOF >> feed.rss.new
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
ln -s $TOTAL.html index.html
|
||||||
|
mv feed.rss.new feed.rss
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue