[system] / trunk / admintools / ww-make-docs-from-cvs Repository:
ViewVC logotype

Diff of /trunk/admintools/ww-make-docs-from-cvs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5549 Revision 5550
1#!/usr/bin/perl -sT 1#!/usr/bin/perl -sT
2################################################################################ 2################################################################################
3# WeBWorK Online Homework Delivery System 3# WeBWorK Online Homework Delivery System
4# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 4# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
5# $CVSHeader: admintools/ww-make-docs-from-cvs,v 1.3 2007/10/02 20:09:47 sh002i Exp $ 5# $CVSHeader: admintools/ww-make-docs-from-cvs,v 1.4 2007/10/02 20:11:00 sh002i Exp $
6# 6#
7# This program is free software; you can redistribute it and/or modify it under 7# This program is free software; you can redistribute it and/or modify it under
8# the terms of either: (a) the GNU General Public License as published by the 8# the terms of either: (a) the GNU General Public License as published by the
9# Free Software Foundation; either version 2, or (at your option) any later 9# Free Software Foundation; either version 2, or (at your option) any later
10# version, or (b) the "Artistic License" which comes with this package. 10# version, or (b) the "Artistic License" which comes with this package.
33#our $CHECKOUT_DIR = '/home/sam/work/admintools/checkoutdir'; 33#our $CHECKOUT_DIR = '/home/sam/work/admintools/checkoutdir';
34#our $DOC_DIR = '/home/sam/work/admintools/docdir'; 34#our $DOC_DIR = '/home/sam/work/admintools/docdir';
35 35
36our $CVS = "/usr/bin/cvs"; 36our $CVS = "/usr/bin/cvs";
37our $MKDIR = "/bin/mkdir"; 37our $MKDIR = "/bin/mkdir";
38our $RM = "/bin/rm";
38our $WW_MAKE_DOCS = '/home/sh002i/work/admintools/ww-make-docs'; 39our $WW_MAKE_DOCS = '/home/sh002i/work/admintools/ww-make-docs';
39#our $WW_MAKE_DOCS = '/home/sam/work/admintools/ww-make-docs'; 40#our $WW_MAKE_DOCS = '/home/sam/work/admintools/ww-make-docs';
40 41
41our $v; # for verbose switch 42our $v; # for verbose switch
42 43
74sub process_dir { 75sub process_dir {
75 my ($source_dir) = @_; 76 my ($source_dir) = @_;
76 my $dest_dir = $source_dir; 77 my $dest_dir = $source_dir;
77 $dest_dir =~ s/^$CHECKOUT_DIR/$DOC_DIR/; 78 $dest_dir =~ s/^$CHECKOUT_DIR/$DOC_DIR/;
78 79
80 system $RM, '-rf', $dest_dir;
79 system $MKDIR, '-p', $dest_dir; 81 system $MKDIR, '-p', $dest_dir;
80 if ($?) { 82 if ($?) {
81 my $exit = $? >> 8; 83 my $exit = $? >> 8;
82 my $signal = $? & 127; 84 my $signal = $? & 127;
83 my $core = $? & 128; 85 my $core = $? & 128;

Legend:
Removed from v.5549  
changed lines
  Added in v.5550

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9