diff options
author | Chris Johns <chrisj@rtems.org> | 2017-09-13 22:34:28 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-09-13 22:34:28 +0000 |
commit | c41ecef0f9f8d9b7e70bc411327f693ba85d6596 (patch) | |
tree | d0b63c02a2359f1911620b4f379c2098ac6d730f | |
parent | 8b4a1da1bc153bec21417f378ecdd563c96741bc (diff) |
Change the handover path to support doxygen.
-rwxr-xr-x | docs/builder/rtems-docs-download | 55 | ||||
-rwxr-xr-x | docs/builder/rtems-docs-upload | 24 |
2 files changed, 51 insertions, 28 deletions
diff --git a/docs/builder/rtems-docs-download b/docs/builder/rtems-docs-download index e2b78a2..22a608f 100755 --- a/docs/builder/rtems-docs-download +++ b/docs/builder/rtems-docs-download @@ -39,9 +39,9 @@ top=$PWD wwwdocs=/data/www/docs.rtems.org/branches # -# Upload URL. +# Handover path. # -docsurl=/data/ftp/pub/rtems/people/chrisj/docs.rtems.org/latest +handover=/data/ftp/pub/rtems/people/chrisj/docs.rtems.org/docs # # Current tags. @@ -62,31 +62,34 @@ cd latest # Download the latest tags and compare the branches in the package with the # current tags. # - ${cp} ${docsurl}/rtems-docs-latest-tags rtems-docs-latest-tags - if [ -f ${current_tags} ]; then - exec 3<& 0 - exec 0< rtems-docs-latest-tags - while read line - do - branch=$(echo ${line} | ${sed} -e 's/[[:space:]].*//g') - latest_hash=$(echo ${line} | ${sed} -e 's/.*[[:space:]]//g') - current_hash=$(cat ${current_tags} | ${grep} ${branch} | ${sed} -e 's/.*[[:space:]]//g') - if [ "${latest_hash}" != "${current_hash}" ]; then - update=yes - fi - done - else - update=yes + if [ -f ${handover}/rtems-docs-latest-tags ] && \ + [ -f ${handover}/rtems-docs-latest.tar.xz ]; then + ${cp} ${handover}/rtems-docs-latest-tags rtems-docs-latest-tags + if [ -f ${current_tags} ]; then + exec 3<& 0 + exec 0< rtems-docs-latest-tags + while read line + do + branch=$(echo ${line} | ${sed} -e 's/[[:space:]].*//g') + latest_hash=$(echo ${line} | ${sed} -e 's/.*[[:space:]]//g') + current_hash=$(cat ${current_tags} | ${grep} ${branch} | ${sed} -e 's/.*[[:space:]]//g') + if [ "${latest_hash}" != "${current_hash}" ]; then + update=yes + fi + done + else + update=yes + fi + if [ ${update} = yes ]; then + ${rm} -rf current + ${cp} -r /data/www/docs.rtems.org/branches current + ${cp} ${handover}/rtems-docs-latest.tar.xz rtems-docs-latest.tar.xz + set +e + ../rtems-docs-unpack-branches + set -e + fi + ${rm} -f rtems-docs-latest-tags fi - if [ ${update} = yes ]; then - ${rm} -rf current - ${cp} -r /data/www/docs.rtems.org/branches current - ${cp} ${docsurl}/rtems-docs-latest.tar.xz rtems-docs-latest.tar.xz - set +e - ../rtems-docs-unpack-branches - set -e - fi - ${rm} -f rtems-docs-latest-tags cd .. exit 0 diff --git a/docs/builder/rtems-docs-upload b/docs/builder/rtems-docs-upload index 7c217b3..a1b0809 100755 --- a/docs/builder/rtems-docs-upload +++ b/docs/builder/rtems-docs-upload @@ -19,6 +19,11 @@ set -e mkdir=/bin/mkdir # +# Handover path. +# +handover=/data/ftp/pub/rtems/people/chrisj/docs.rtems.org/docs + +# # We run where the script is located. # cd $(dirname $0) @@ -33,8 +38,23 @@ fi cd latest ../rtems-docs-build-branches if [ -f rtems-docs-latest.tar.xz ]; then - mv rtems-docs-latest.tar.xz rtems-docs-latest-tags \ - /data/ftp/pub/rtems/people/chrisj/docs.rtems.org/latest/ + if [ ! -d ${handover} ]; then + ${mkdir} -p ${handover} + fi + # + # Empty the directory. + # + rm -rf ${handover}/* + # + # Copy to a holding directory on the destination file system and then move + # the files. The move will be quick while the move to the file system will be + # a slower copy and may result in the otherside looking at a partially copied + # file. + # + ${mkdir} -p ${handover}/hold + mv rtems-docs-latest.tar.xz rtems-docs-latest-tags ${handover}/hold/ + mv ${handover}/hold/* ${handover}/ + rm -rf ${handover}/hold fi cd .. |