summaryrefslogtreecommitdiff
path: root/doxygen/builder/rtems-doxygen-upload
diff options
context:
space:
mode:
Diffstat (limited to 'doxygen/builder/rtems-doxygen-upload')
-rwxr-xr-xdoxygen/builder/rtems-doxygen-upload61
1 files changed, 61 insertions, 0 deletions
diff --git a/doxygen/builder/rtems-doxygen-upload b/doxygen/builder/rtems-doxygen-upload
new file mode 100755
index 0000000..f9cb7d8
--- /dev/null
+++ b/doxygen/builder/rtems-doxygen-upload
@@ -0,0 +1,61 @@
+#! /bin/sh
+#
+# RTEMS Documentation Project
+#
+# Copyright 2017 Chris Johns <chrisj@rtems.org>
+# 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