commit: cf3a50598652c1ba49933b247b46284bf4e283d0 Author: Alex Legler <alex <AT> a3li <DOT> li> AuthorDate: Sun Oct 4 21:11:56 2015 +0000 Commit: Alex Legler <a3li <AT> gentoo <DOT> org> CommitDate: Sun Oct 4 21:11:56 2015 +0000 URL: https://gitweb.gentoo.org/sites/www.git/commit/?id=cf3a5059
Keep data files when updates cannot be fetched bin/update-devaway.sh | 5 +++-- bin/update-glsa.sh | 5 +++-- bin/update-herds.sh | 3 ++- bin/update-mirrors.sh | 8 +++++--- bin/update-packages.sh | 3 ++- bin/update-planet.sh | 5 +++-- bin/update-use.sh | 3 ++- bin/update-wiki.sh | 5 +++-- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/bin/update-devaway.sh b/bin/update-devaway.sh index 29bf264..cea35e5 100755 --- a/bin/update-devaway.sh +++ b/bin/update-devaway.sh @@ -2,5 +2,6 @@ # TODO: One day, fix up the json to be compatible with jekyll's parser echo -n 'Updating devaway information...' -wget 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml 2>/dev/null -echo 'done.' \ No newline at end of file +wget 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/devaway.xml.tmp _data/devaway.xml +echo 'done.' diff --git a/bin/update-glsa.sh b/bin/update-glsa.sh index d03f579..6a64069 100755 --- a/bin/update-glsa.sh +++ b/bin/update-glsa.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating GLSA information...' -wget 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml 2>/dev/null -echo 'done.' \ No newline at end of file +wget 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/glsa.yaml.tmp _data/glsa.yaml +echo 'done.' diff --git a/bin/update-herds.sh b/bin/update-herds.sh index 53c3c1b..5e21b08 100755 --- a/bin/update-herds.sh +++ b/bin/update-herds.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating herd information...' -wget 'https://api.gentoo.org/packages/herds.xml' -O _data/herds.xml 2>/dev/null +wget 'https://api.gentoo.org/packages/herds.xml' -O _data/herds.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/herds.xml.tmp _data/herds.xml echo 'done.' diff --git a/bin/update-mirrors.sh b/bin/update-mirrors.sh index d74dbaf..0f63bf9 100755 --- a/bin/update-mirrors.sh +++ b/bin/update-mirrors.sh @@ -1,6 +1,8 @@ #!/bin/bash echo -n 'Updating mirror information...' -wget 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml 2>/dev/null -wget 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml 2>/dev/null -echo 'done.' \ No newline at end of file +wget 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/mirrors-distfiles.xml.tmp _data/mirrors-distfiles.xml +wget 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/mirrors-rsync.xml.tmp _data/mirrors-rsync.xml +echo 'done.' diff --git a/bin/update-packages.sh b/bin/update-packages.sh index 1140207..592e1cf 100755 --- a/bin/update-packages.sh +++ b/bin/update-packages.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating Packages information...' -wget 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml 2>/dev/null +wget 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/packages.xml.tmp _data/packages.xml echo 'done.' diff --git a/bin/update-planet.sh b/bin/update-planet.sh index 5fb4ff9..a0c8eb4 100755 --- a/bin/update-planet.sh +++ b/bin/update-planet.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating Planet information...' -wget 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml 2>/dev/null -echo 'done.' \ No newline at end of file +wget 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/planet.xml.tmp _data/planet.xml +echo 'done.' diff --git a/bin/update-use.sh b/bin/update-use.sh index b825c3b..1a1b5a4 100755 --- a/bin/update-use.sh +++ b/bin/update-use.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating USE flag information...' -wget 'https://api.gentoo.org/packages/use.json' -O _data/use.json 2>/dev/null +wget 'https://api.gentoo.org/packages/use.json' -O _data/use.json.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/use.json.tmp _data/use.json echo 'done.' diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh index c27fb73..2759813 100755 --- a/bin/update-wiki.sh +++ b/bin/update-wiki.sh @@ -1,5 +1,6 @@ #!/bin/bash echo -n 'Updating Wiki information...' -wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml 2>/dev/null -echo 'done.' \ No newline at end of file +wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null +[ $? -eq 0 ] && mv _data/wiki.xml.tmp _data/wiki.xml +echo 'done.'