[Python-checkins] CVS: python/dist/src/Doc/tools push-docs.sh,1.6,1.6.2.1 update-docs.sh,1.6,1.6.2.1

Fred L. Drake fdrake@users.sourceforge.net
Sat, 21 Apr 2001 23:19:31 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv16005

Modified Files:
      Tag: release21-maint
	push-docs.sh update-docs.sh 
Log Message:

Update publish-to-SourceForge scripts to automatically determine if the
branch is the head (development) branch or a maintenance brach, and use
the appropriate target directory for each.


Index: push-docs.sh
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** push-docs.sh	2001/04/13 05:13:55	1.6
--- push-docs.sh	2001/04/22 06:19:29	1.6.2.1
***************
*** 8,11 ****
--- 8,21 ----
  ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org'
  
+ VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'`
+ EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
+ if [ "$EXTRA" ] ; then
+     DOCLABEL="maintenance"
+     DOCTYPE="maint"
+ else
+     DOCLABEL="development"
+     DOCTYPE="devel"
+ fi
+ 
  EXPLANATION=''
  
***************
*** 31,40 ****
  PACKAGE="html-$RELEASE.tar.bz2"
  scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
! ssh python.sourceforge.net tmp/update-docs.sh $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
  
! Mail -s '[development doc updates]' $ADDRESSES <<EOF
  The development version of the documentation has been updated:
  
! 	http://python.sourceforge.net/devel-docs/
  
  $EXPLANATION
--- 41,50 ----
  PACKAGE="html-$RELEASE.tar.bz2"
  scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
! ssh python.sourceforge.net tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
  
! Mail -s "[$DOCLABEL doc updates]" $ADDRESSES <<EOF
  The development version of the documentation has been updated:
  
! 	http://python.sourceforge.net/$DOCTYPE-docs/
  
  $EXPLANATION

Index: update-docs.sh
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/update-docs.sh,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** update-docs.sh	2001/04/13 05:13:55	1.6
--- update-docs.sh	2001/04/22 06:19:29	1.6.2.1
***************
*** 12,21 ****
  fi
  
! UPDATES="$HOME/tmp/$1"
  
  cd /home/groups/python/htdocs || exit $?
! rm -rf devel-docs || exit $?
! mkdir devel-docs || exit $?
! cd devel-docs || exit $?
  (bzip2 -dc "$UPDATES" | tar xf -) || exit $?
  rm "$UPDATES" || exit $?
--- 12,30 ----
  fi
  
! DOCTYPE="$1"
! UPDATES="$HOME/tmp/$2"
  
+ TMPDIR="$$-docs"
+ 
  cd /home/groups/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 $?