#! /bin/sh # # RTEMS Documentation Project # # Copyright 2017 Chris Johns # All rights reserved # # Public domain # # # Exit on error. # set -e # # Executables # mkdir=/bin/mkdir # # Handover path. # handover=/data/ftp/pub/rtems/people/chrisj/docs.rtems.org/doxygen # # We run where the script is located. # cd $(dirname $0) # # If no update directory create it. # if [ ! -d latest ]; then ${mkdir} latest fi cd latest ../rtems-doxygen-build-branches if [ -f rtems-doxygen-latest.tar.gz ] && [ -f rtems-doxygen-latest-tags ]; then 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-doxygen-latest.tar.gz rtems-doxygen-latest-tags ${handover}/hold/ mv ${handover}/hold/* ${handover}/ rm -rf ${handover}/hold fi cd .. exit 0