blob: 5f4b03d79ecb63e04b918ae79a5732fd19a08cb1 (
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
|
#! /bin/sh
# Script which installs a development snapshot of the documentation
# into the "Python @ SourceForge" website.
#
# The push-docs.sh script pushes this to the SourceForge when needed
# and removes it when done.
if [ -z "$HOME" ] ; then
HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
export HOME
fi
DOCTYPE="$1"
UPDATES="$HOME/tmp/$2"
TMPDIR="$$-docs"
cd /home/groups/p/py/python/htdocs || exit $?
mkdir $TMPDIR || exit $?
cd $TMPDIR || exit $?
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
cd .. || exit $?
if [ -d $DOCTYPE-docs ] ; then
mv $DOCTYPE-docs $DOCTYPE-temp
fi
mv $TMPDIR $DOCTYPE-docs
rm -rf $DOCTYPE-temp || exit $?
rm "$UPDATES" || exit $?
|