~ubuntu-branches/ubuntu/trusty/netbeans/trusty

« back to all changes in this revision

Viewing changes to xml/bin/update_www.sh

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
4
#
 
5
# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
6
#
 
7
# The contents of this file are subject to the terms of either the GNU
 
8
# General Public License Version 2 only ("GPL") or the Common
 
9
# Development and Distribution License("CDDL") (collectively, the
 
10
# "License"). You may not use this file except in compliance with the
 
11
# License. You can obtain a copy of the License at
 
12
# http://www.netbeans.org/cddl-gplv2.html
 
13
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
 
14
# specific language governing permissions and limitations under the
 
15
# License.  When distributing the software, include this License Header
 
16
# Notice in each file and include the License file at
 
17
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
 
18
# particular file as subject to the "Classpath" exception as provided
 
19
# by Sun in the GPL Version 2 section of the License file that
 
20
# accompanied this code. If applicable, add the following below the
 
21
# License Header, with the fields enclosed by brackets [] replaced by
 
22
# your own identifying information:
 
23
# "Portions Copyrighted [year] [name of copyright owner]"
 
24
#
 
25
# Contributor(s):
 
26
#
 
27
# The Original Software is NetBeans. The Initial Developer of the Original
 
28
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
 
29
# Microsystems, Inc. All Rights Reserved.
 
30
#
 
31
# If you wish your version of this file to be governed by only the CDDL
 
32
# or only the GPL Version 2, indicate your decision by adding
 
33
# "[Contributor] elects to include this software in this distribution
 
34
# under the [CDDL or GPL Version 2] license." If you do not indicate a
 
35
# single choice of license, a recipient has the option to distribute
 
36
# your version of this file under either the CDDL, the GPL Version 2 or
 
37
# to extend the choice of license to its licensees as provided above.
 
38
# However, if you add GPL Version 2 code and therefore, elected the GPL
 
39
# Version 2 license, then the option applies only if the new code is
 
40
# made subject to such option by the copyright holder.
 
41
 
 
42
#set -x
 
43
 
 
44
#
 
45
# It is used as automatical update of XML web pages.
 
46
#
 
47
# You must specify $CVS_ROOT, which should contain nb_all/xml,
 
48
#   nb_all/nbbuild with compiled nbantext.jar and plans folder.
 
49
# e.g.: CVS_ROOT=/tmp/cvs_netbeans_org
 
50
# If necessary, you can specify proxy host and port
 
51
#   HTTP_PROXYHOST, HTTP_PROXYPORT variables.
 
52
#
 
53
# You can run it anywhere, typically it is run by cron.
 
54
#
 
55
 
 
56
 
 
57
#
 
58
# Date stamp
 
59
#
 
60
DATE_STAMP=`date +%Y.%m.%d-%H:%M`
 
61
 
 
62
### DEBUG
 
63
set > $CVS_ROOT/"${DATE_STAMP}__0.set.txt"
 
64
 
 
65
 
 
66
#
 
67
# update libs
 
68
#
 
69
cd $CVS_ROOT/nb_all/libs
 
70
echo "#################" >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
71
echo "# cvs update libs" >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
72
cvs update -A -d -P 2>&1 >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
73
 
 
74
 
 
75
#
 
76
# update xml
 
77
#
 
78
cd $CVS_ROOT/nb_all/xml
 
79
echo "################" >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
80
echo "# cvs update xml" >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
81
cvs update -A -d -P 2>&1 >> $CVS_ROOT/"${DATE_STAMP}__1.update.txt"
 
82
 
 
83
 
 
84
#
 
85
# add xalan and xerces on classpath
 
86
#
 
87
cd bin
 
88
. init-xalan.sh
 
89
cd ..
 
90
 
 
91
 
 
92
#
 
93
# update content
 
94
#
 
95
cd www
 
96
ant -Dhttp.proxyPort=${HTTP_PROXYPORT} -Dhttp.proxyHost=${HTTP_PROXYHOST} -logfile $CVS_ROOT/"${DATE_STAMP}__2.ant_all.txt" all 2>&1 >> $CVS_ROOT/"${DATE_STAMP}__2.ant_error.txt"
 
97
 
 
98
 
 
99
#
 
100
# commit changes
 
101
#
 
102
cvs commit -m "Automatic update -- ${DATE_STAMP}." 2>&1 > $CVS_ROOT/"${DATE_STAMP}__3.commit.txt"
 
103
 
 
104
 
 
105
#
 
106
# post update xml - to log status after commit
 
107
#
 
108
cvs update -A -d -P 2>&1 >> $CVS_ROOT/"${DATE_STAMP}__4.post-update.txt"