diff options
author | 2015-10-04 23:11:56 +0200 | |
---|---|---|
committer | 2015-10-04 23:11:56 +0200 | |
commit | cf3a50598652c1ba49933b247b46284bf4e283d0 (patch) | |
tree | 953841ca819a5d352683322f11b92c509ff24248 /bin/update-mirrors.sh | |
parent | Adapt to pgo updates (diff) | |
download | www-cf3a50598652c1ba49933b247b46284bf4e283d0.tar.gz www-cf3a50598652c1ba49933b247b46284bf4e283d0.tar.bz2 www-cf3a50598652c1ba49933b247b46284bf4e283d0.zip |
Keep data files when updates cannot be fetched
Diffstat (limited to 'bin/update-mirrors.sh')
-rwxr-xr-x | bin/update-mirrors.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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.' |