File: make_distrib_docs

package info (click to toggle)
polyorb 2.11~20140418-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,012 kB
  • ctags: 465
  • sloc: ada: 273,015; sh: 4,507; makefile: 4,265; python: 1,332; cpp: 1,213; java: 507; ansic: 274; xml: 30; perl: 23; exp: 6
file content (60 lines) | stat: -rwxr-xr-x 1,153 bytes parent folder | download | duplicates (3)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
#
# $Id$
#
# This script builds a compressed archive suitable for the distribution
# of PolyORB documentation
#
# Usage: make_distrib_docs dir
#
#   dir   : the distribution will unpack in directory <dir> and will be
#           named <dir>.tar.gz
#

###################################################
# Usage information
###################################################

if [ $# = 0 ]; then
   echo "Usage: $0 dir";
   exit 0;
fi;

dir="$1"

##########################################
# Building the documentation
##########################################

echo Building the documentation

cd doc
make release
cd ..

##########################################
# Preparing files
##########################################

echo Preparing files

mkdir -p ${dir}

for f in `cat doc/MANIFEST`; do
  if [ ! -f doc/${f} ]; then
    echo "FATAL: ${dir}/${f} is not a regular file."
    exit 1
  fi
  mkdir -p $dir/`dirname $f`
  cp doc/$f ${dir}/`dirname $f`/
done

###################################################
# Packaging
###################################################

echo Packaging

tar zcvf ${dir}.tar.gz ${dir}

rm -rf ${dir}