Files
PolyORB/utils/make_distrib_docs
Thomas Quinot 2b7f1a2c52 Use $1 as the source for setting 'dir'.
[Imported from Perforce change 8141 at 2006-12-01 20:30:00]

Subversion-branch: /trunk/polyorb
Subversion-revision: 35749
2004-06-17 16:18:47 +00:00

61 lines
1.1 KiB
Bash
Executable File

#!/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}