diff options
-rwxr-xr-x | mastermirror-staging.sh | 9 | ||||
-rwxr-xr-x | rsync-gen.sh | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/mastermirror-staging.sh b/mastermirror-staging.sh index 28f00d7..3952c4f 100755 --- a/mastermirror-staging.sh +++ b/mastermirror-staging.sh @@ -31,6 +31,7 @@ STAGING_DIR="/var/tmp/mastermirror-staging" STAGING_CHANGELOG_DIR="/var/tmp/mastermirror-staging/changelogs" HERDS_XML_URI=https://api.gentoo.org/packages/herds.xml +PROJECTS_XML_URI=https://api.gentoo.org/metastructure/projects.xml # TODO: we should probably be checking out to a directory and only rsyncing # that on success of all checkouts. @@ -68,6 +69,14 @@ cd ${STAGING_DIR}/herds f=herds.xml ${WGET} -q "${HERDS_XML_URI}" -O ${f}.tmp && mv -f ${f}{.tmp,} || rm -f ${f}.tmp +# projects.xml +if [[ ! -d ${STAGING_DIR}/projects ]]; then + mkdir -p ${STAGING_DIR}/projects +fi +cd ${STAGING_DIR}/projects +f=projects.xml +${WGET} -q "${PROJECTS_XML_URI}" -O ${f}.tmp && mv -f ${f}{.tmp,} || rm -f ${f}.tmp + # dtd if [[ ! -d ${STAGING_DIR}/dtd ]]; then # not checked out yet, run initial co diff --git a/rsync-gen.sh b/rsync-gen.sh index 72668c1..c5dbe1e 100755 --- a/rsync-gen.sh +++ b/rsync-gen.sh @@ -11,7 +11,7 @@ # 3) place dtd info in STAGEDIR # 4) place glsa's in STAGEDIR # 5) place news in STAGEDIR -# 6) place herds.xml in STAGEDIR +# 6) place herds.xml and projects.xml in STAGEDIR # 7) rsync from STAGEDIR to FINALDIR umask 022 @@ -214,10 +214,11 @@ date -R -u > ${STAGEDIR}/metadata/news/timestamp.chk echo "END NEWS $(date -u)" >> ${TIMESLOG} # end 5) -# 6) place herds.xml in STAGEDIR -echo "START HERDS $(date -u)" >> ${TIMESLOG} +# 6) place herds.xml and projects.xml in STAGEDIR +echo "START HERDS & PROJ $(date -u)" >> ${TIMESLOG} rsync -Wqa --checksum ${EXPORTS}/herds/herds.xml ${STAGEDIR}/metadata/herds.xml -echo "END HERDS $(date -u)" >> ${TIMESLOG} +rsync -Wqa --checksum ${EXPORTS}/projects/projects.xml ${STAGEDIR}/metadata/projects.xml +echo "END HERDS & PROJ $(date -u)" >> ${TIMESLOG} # end 6) # 7) rsync from STAGEDIR to FINALDIR |