root/trunk/build/quickstart/linux/bw

Revision 2008 (checked in by douglm, 4 years ago)

Changes to timezones had brokena clean build.

Split CalTimeZones? into an abstract class + implementation.

Changed annotation build to skip the above implemtnation.

Fix to restore to skip owner info in timezones.

Changed DirToll? to allow deletion of ldap hierarchies.

Fixes to the install process.

  • Property svn:mergeinfo set to
  • Property svn:executable set to *
Line 
1 #! /bin/sh
2
3 #
4 # This file is included by the quickstart script file "bw" so that it can live
5 # within the svn repository.
6 #
7
8 if [ -z "$JAVA_HOME" -o ! -d "$JAVA_HOME" ] ; then
9   errorUsage "JAVA_HOME is not defined correctly for bedework."
10 fi
11
12 ANT_HOME=`dirname "$PRG"`/apache-ant-1.7.0
13 ANT_HOME=`cd "$ANT_HOME" && pwd`
14
15 echo ""
16 echo ""
17 echo "  Bedework Calendar System"
18 echo "  ------------------------"
19 echo ""
20
21 PRG="$0"
22
23 usage() {
24   echo "  $PRG [ -quickstart | -bwchome path ] [ -bwc configname ] [ -offline } [ target ] "
25   echo ""
26   echo "     -quickstart  Use the current quickstart configurations "
27   echo "     -bwchome     Specify path to configurations"
28   echo "     -bwc         Specify configuration name"
29   echo "     -offline     Build without atempting to retrieve library jars"
30   echo "     target       Ant target to execute"
31   echo ""
32   echo "   Invokes ant to build or deploy the Bedework system. Uses a configuration"
33   echo "   directory which contains one directory per configuration."
34   echo ""
35   echo "   Within each configuration directory we expect a file called build.properties"
36   echo "   which should point to the property and options file needed for the deploy process"
37   echo ""
38   echo "   In general these files will be in the same directory as build.properties."
39   echo "   The environment variable BEDEWORK_CONFIG contains the path to the current"
40   echo "   configuration directory and can be used to build a path to the other files."
41   echo ""
42 }
43
44 errorUsage() {
45   echo "*******************************************************"
46   echo "Error: $1"
47   echo "*******************************************************"
48   usage
49   exit 1
50 }
51
52 saveddir=`pwd`
53
54 export QUICKSTART_HOME=$saveddir
55
56 # Default some parameters
57
58 BWCONFIGS=
59 bwc=default
60 BWCONFIG=
61 offline=
62 quickstart=
63
64 if [ "$1" = "" ] ; then
65   usage
66   exit 1
67 fi
68
69 while [ "$1" != "" ]
70 do
71   # Process the next arg
72   case $1       # Look at $1
73   in
74     -bwchome)         # Define location of configs
75       shift
76       BWCONFIGS="$1"
77       shift
78       ;;
79     -quickstart)
80       quickstart="yes"
81       shift
82       ;;
83     -usage | -help | -? | ?)
84       usage
85       exit
86       shift
87       ;;
88     -bwc)
89       shift
90       bwc="$1"
91       shift
92       ;;
93     -offline)
94       offline="-Dorg.bedework.offline.build=yes"
95       shift
96       ;;
97     -*)
98       usage
99       exit 1
100       ;;
101     *)
102       # Assume we've reached the target(s)
103       break
104       ;;
105   esac
106 done
107
108 if [ "$quickstart" != "" ] ; then
109   if [ "$BWCONFIGS" != "" ] ; then
110     errorUsage "Cannot specify both -quickstart and -bwchome"
111   fi
112
113   BWCONFIGS=$QUICKSTART_HOME/bedework/config/bwbuild
114 elif [ "$BWCONFIGS" = "" ] ; then
115   BWCONFIGS=$HOME/bwbuild
116 fi
117
118 export BEDEWORK_CONFIGS_HOME=$BWCONFIGS
119 export BEDEWORK_CONFIG=$BWCONFIGS/$bwc
120
121 if [ ! -f "$BEDEWORK_CONFIG/build.properties" ] ; then
122   errorUsage "Configuration $BEDEWORK_CONFIG does not exist or is not a bedework configuration."
123 fi
124
125 # Make available for ant
126 export BWCONFIG="-Dorg.bedework.user.build.properties=$BEDEWORK_CONFIG/build.properties"
127
128 echo "BWCONFIGS=$BWCONFIGS"
129 echo "BWCONFIG=$BWCONFIG"
130
131 CLASSPATH=$ANT_HOME/lib/ant-launcher.jar
132
133 $JAVA_HOME/bin/java -classpath $CLASSPATH $offline -Dant.home=$ANT org.apache.tools.ant.launch.Launcher $BWCONFIG $*
Note: See TracBrowser for help on using the browser.