summaryrefslogtreecommitdiff
path: root/docs/builder/rtems-docs-publish
blob: d8a5f301b4c7166eed514367532d5a856ef387c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh
#
# RTEMS Documentation Project
#
# Copyright 2017 Chris Johns <chrisj@rtems.org>
# All rights reserved
#
# Public domain
#

#
# Exit on error.
#
set -e

#
# Executables
#
cp=/bin/cp
rm=/bin/rm

#
# The current directory.
#
current=/data/www/docs.rtems.org/branches

#
# The new docs
#
new=/usr/home/chrisj/docs/latest/new

#
# If there is a new directory we have something to publsh.
#
if [ -d ${new} ]; then
 ${rm} -rf ${current}.tags ${current}/*
 ${cp} -r ${new}/.tags ${new}/* ${current}/.
 ${rm} -rf ${new}
fi

exit 0