root/releases/bedework-3.8/build/quickstart/linux/bw

Revision 3504 (checked in by douglm, 1 year ago)

Windows build referring to bwicalendar not bwical for updateall

Add comment to all scripts and fix windows scripts

  • 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 ANT_HOME=`dirname "$PRG"`/apache-ant-1.7.0
9 ANT_HOME=`cd "$ANT_HOME" && pwd`
10
11 #ant_listener="-listener org.apache.tools.ant.listener.Log4jListener"
12 #ant_xmllogfile="-DXmlLogger.file=log.xml"
13 #ant_logger="-logger org.apache.tools.ant.XmlLogger"
14
15 ant_listener=
16 ant_xmllogfile=
17 ant_logger=
18
19 ant_loglevel="-quiet"
20 bw_loglevel=""
21
22 # Projects we need to update - these are the svn projects - not internal variables
23 # or user parameters.
24 updateProjects="access"
25 updateProjects="$updateProjects  bedework"
26 updateProjects="$updateProjects  bedework-carddav"
27 updateProjects="$updateProjects  bwannotations"
28 updateProjects="$updateProjects  bwcalcore"
29 updateProjects="$updateProjects  bwcaldav"
30 updateProjects="$updateProjects  bwcalFacade"
31 updateProjects="$updateProjects  bwdeployutil"
32 updateProjects="$updateProjects  bwical"
33 updateProjects="$updateProjects  bwinterfaces"
34 updateProjects="$updateProjects  bwmisc"
35 updateProjects="$updateProjects  bwsysevents"
36 updateProjects="$updateProjects  bwtzsvr"
37 updateProjects="$updateProjects  bwwebapps"
38 updateProjects="$updateProjects  bwxml"
39 updateProjects="$updateProjects  cachedfeeder"
40 updateProjects="$updateProjects  caldav"
41 updateProjects="$updateProjects  davutil"
42 updateProjects="$updateProjects  dumprestore"
43 updateProjects="$updateProjects  indexer"
44 updateProjects="$updateProjects  rpiutil"
45 updateProjects="$updateProjects  synch"
46 updateProjects="$updateProjects  webdav"
47
48 # Projects we will build - pkgdefault (bedework) is built if nothing specified
49 pkgdefault=yes
50 access=
51 bedework=
52 bwannotations=
53 bwcalcore=
54 bwcaldav=
55 bwcalfacade=
56 bwdeployutil=
57 bwicalendar=
58 bwinterfaces=
59 bwmisc=
60 bwsysevents=
61 bwtools=
62 bwwebapps=
63 bwxml=
64 caldav=
65 caldavTest=
66 carddav=
67 catsvr=
68 client=
69 davutil=
70 dumprestore=
71 exchgGateway=
72 indexer=
73 monitor=
74 naming=
75 rpiutil=
76 synch=
77 testsuite=
78 tzsvr=
79 webdav=
80
81 # Special targets - avoiding dependencies
82
83 deploylog4j=
84 dirstart=
85
86 specialTarget=
87
88 echo ""
89 echo "  Bedework Calendar System"
90 echo "  ------------------------"
91 echo ""
92
93 PRG="$0"
94
95 usage() {
96   echo "  $PRG ACTION"
97   echo "  $PRG [CONFIG-SOURCE] [CONFIG] [PROJECT] [ -offline ] [LOG_LEVEL] [ target ] "
98   echo ""
99   echo " where:"
100   echo ""
101   echo "   ACTION defines an action to take usually in the context of the quickstart."
102   echo "    In a deployed system many of these actions are handled directly by a"
103   echo "    deployed application. ACTION may be one of"
104   echo "      -updateall  Does an svn update of all projects"
105   echo "      -zoneinfo   builds zoneinfo data for the timezones server"
106   echo "                  requires -version and -tzdata parameters.   "
107   echo "                  NOTE: build depends on glib2 and only works on Linux/Unix"
108   echo "      -buildwebcache     builds webcache"
109   echo "      -deploywebcache    deploys webcache"
110   echo "      -deployurlbuilder  deploys url/widget builder"
111   echo ""
112   echo "   CONFIG-SOURCE optionally defines the location of configurations and"
113   echo "                 is one or none of  "
114   echo "     -quickstart    to use the configurations within the quickstart"
115   echo "     -bwchome path  to specify the location of the bwbuild directory"
116   echo "   The default is to look in the user home for the bwbuild directory."
117   echo ""
118   echo "   CONFIG optionally defines the configuration to build"
119   echo "      -bwc configname"
120   echo ""
121   echo "   -offline     Build without attempting to retrieve library jars"
122   echo ""
123   echo "   LOG_LEVEL sets the level of logging and can be"
124   echo "      -log-silent   Nearly silent"
125   echo "      -log-quiet    The default"
126   echo "      -log-inform   A little more noisy"
127   echo "      -log-verbose  Noisier"
128   echo "      -log-configs  Some info about configurations"
129   echo "      -ant-debug    Vast amounts of ant output"
130   echo "      -build-debug  Some bedework build debug output"
131   echo ""
132   echo "   target       Ant target to execute"
133   echo ""
134   echo "   PROJECT optionally defines the package to build. If omitted the main"
135   echo "           bedework calendar system will be built otherwise it is one of"
136   echo "           the core, ancillary or experimental targets below:"
137   echo ""
138   echo "   Core sub-projects: required for a functioning system"
139   echo "     -access       Target is for the access classes"
140   echo "     -bwann        Target is for the annotation classes"
141   echo "     -bwcalcore    Target is for the bedework core api implementation"
142   echo "     -bwcaldav     Target is for the bedework CalDAV implementation"
143   echo "     -bwcalfacade  Target is for the bedework api interface classes"
144   echo "     -bwicalendar  Target is for the bedework icalendar classes"
145   echo "     -bwinterfaces Target is for the bedework service and api interfaces"
146   echo "     -bwmisc       Target is for misc classes"
147   echo "     -bwsysevents  Target is for the system JMS event classes"
148   echo "     -bwwebapps    Target is for the bedework web ui classes"
149   echo "     -bwxml        Target is for the Bedework XML schemas build"
150   echo "                        (usually built automatically be dependent projects"
151   echo "     -caldav       Target is for the generic CalDAV server"
152   echo "     -carddav      Target is for the CardDAV build"
153   echo "     -carddav deploy-addrbook    To deploy the Javascript Addressbook client."
154   echo "     -davutil      Target is for the Bedework dav util classes"
155   echo "     -dumprestore  Target is for the Bedework dump/restore service"
156   echo "     -indexer      Target is for the Bedework indexer service"
157   echo "     -rpiutil      Target is for the Bedework util classes"
158   echo "     -synch        Target is for the synch build"
159   echo "     -tzsvr        Target is for the timezones server build"
160   echo "     -webdav       Target is for the WebDAV build"
161   echo "   Ancillary projects: not required"
162   echo "     -bwtools      Target is for the Bedework tools build"
163   echo "     -caldavTest   Target is for the CalDAV Test build"
164   echo "     -deployutil   Target is for the Bedework deployment classes"
165   echo "     -monitor      Target is for the bedework monitor application"
166   echo "     -testsuite    Target is for the bedework test suite"
167   echo "   Experimental projects: no guarantees"
168   echo "     -catsvr       Target is for the Catsvr build"
169   echo "     -client       Target is for the bedework client application build"
170   echo "     -naming       Target is for the abstract naming api"
171   echo ""
172   echo "   Invokes ant to build or deploy the Bedework system. Uses a configuration"
173   echo "   directory which contains one directory per configuration."
174   echo ""
175   echo "   Within each configuration directory we expect a file called build.properties"
176   echo "   which should point to the property and options file needed for the deploy process"
177   echo ""
178   echo "   In general these files will be in the same directory as build.properties."
179   echo "   The environment variable BEDEWORK_CONFIG contains the path to the current"
180   echo "   configuration directory and can be used to build a path to the other files."
181   echo ""
182 }
183
184 errorUsage() {
185   echo "*******************************************************************************************"
186   echo "Error: $1"
187   echo "*******************************************************************************************"
188   echo
189   echo "Sleeping 5 seconds before displaying usage. Safe to ctrl-C."
190   sleep 5
191   echo ""
192   usage
193   exit 1
194 }
195
196 # ----------------------------------------------------------------------------
197 # Update the projects
198 # ----------------------------------------------------------------------------
199 actionUpdateall() {
200   for project in $updateProjects
201   do
202     echo "*********************************************************************"
203     echo "Updating project $project"
204     echo "*********************************************************************"
205     svn update $project
206   done
207  
208   exit 0
209 }
210
211 usageZoneinfo() {
212   echo ""
213   echo "$PRG -zoneinfo -fetch"
214   echo "to have data fetched and processed. Alternatively to process a specifi set of data"
215   echo "$PRG -zoneinfo -version VERSION -tzdata path-to-data"
216   echo "for example:"
217   echo "$PRG -zoneinfo -version 2010m -tzdata /data/olson/tzdata2010m.tar.gz"
218   echo ""
219   echo "The data can be obtained manually in the following manner:"
220   echo "  wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'"
221   echo ""
222   echo "The version is the '*' part of the name"
223  
224   exit 1
225 }
226
227 # Change to the next project to build. Exit if we're done.
228 # The order below reflects the dependencies
229 setDirectory() {
230     specialTarget=
231    
232 #     Special targets
233         if [ "$dirstart" != "" ] ; then
234           cd $QUICKSTART_HOME
235           specialTarget=dirstart
236       dirstart=
237           return
238         fi
239
240         if [ "$deploylog4j" != "" ] ; then
241           cd $QUICKSTART_HOME
242           specialTarget=deploylog4j
243       deploylog4j=
244           return
245         fi
246        
247 #     projects
248
249         if [ "$bwdeployutil" != "" ] ; then
250           cd $QUICKSTART_HOME/bwdeployutil
251       bwdeployutil=
252           return
253         fi
254
255         if [ "$bwxml" != "" ] ; then
256           cd $QUICKSTART_HOME/bwxml
257       bwxml=
258           return
259         fi
260        
261         if [ "$rpiutil" != "" ] ; then
262           cd $QUICKSTART_HOME/rpiutil
263       rpiutil=
264           return
265         fi
266        
267         if [ "$access" != "" ] ; then
268           cd $QUICKSTART_HOME/access
269       access=
270           return
271         fi
272        
273         if [ "$davutil" != "" ] ; then
274           cd $QUICKSTART_HOME/davutil
275       davutil=
276           return
277         fi
278        
279         if [ "$webdav" != "" ] ; then
280           cd $QUICKSTART_HOME/webdav
281       webdav=
282           return
283         fi
284        
285         if [ "$caldav" != "" ] ; then
286           cd $QUICKSTART_HOME/caldav
287       caldav=
288           return
289         fi
290        
291         if [ "$caldavTest" != "" ] ; then
292           cd $QUICKSTART_HOME/caldavTest
293       caldavTest=
294           return
295         fi
296        
297         if [ "$carddav" != "" ] ; then
298           cd $QUICKSTART_HOME/bedework-carddav
299       carddav=
300           return
301         fi
302
303         if [ "$bwannotations" != "" ] ; then
304           cd $QUICKSTART_HOME/bwannotations
305       bwannotations=
306           return
307         fi
308
309         if [ "$bwcalfacade" != "" ] ; then
310           cd $QUICKSTART_HOME/bwcalFacade
311       bwcalfacade=
312           return
313         fi
314
315         if [ "$bwinterfaces" != "" ] ; then
316           cd $QUICKSTART_HOME/bwinterfaces
317       bwinterfaces=
318           return
319         fi
320
321         if [ "$bwsysevents" != "" ] ; then
322           cd $QUICKSTART_HOME/bwsysevents
323       bwsysevents=
324           return
325         fi
326
327         if [ "$bwicalendar" != "" ] ; then
328           cd $QUICKSTART_HOME/bwical
329       bwicalendar=
330           return
331         fi
332
333         if [ "$bwmisc" != "" ] ; then
334           cd $QUICKSTART_HOME/bwmisc
335       bwmisc=
336           return
337         fi
338        
339         if [ "$bwwebapps" != "" ] ; then
340           cd $QUICKSTART_HOME/bwwebapps
341       bwwebapps=
342           return
343         fi
344
345         if [ "$bwcaldav" != "" ] ; then
346           cd $QUICKSTART_HOME/bwcaldav
347       bwcaldav=
348           return
349         fi
350
351         if [ "$bwcalcore" != "" ] ; then
352           cd $QUICKSTART_HOME/bwcalcore
353       bwcalcore=
354           return
355         fi
356        
357         if [ "$catsvr" != "" ] ; then
358           cd $QUICKSTART_HOME/catsvr
359       catsvr=
360           return
361         fi
362        
363         if [ "$client" != "" ] ; then
364           cd $QUICKSTART_HOME/bwclient
365       client=
366           return
367         fi
368        
369         if [ "$indexer" != "" ] ; then
370           cd $QUICKSTART_HOME/indexer
371       indexer=
372           return
373         fi
374        
375         if [ "$dumprestore" != "" ] ; then
376           cd $QUICKSTART_HOME/dumprestore
377       dumprestore=
378           return
379         fi
380        
381         if [ "$bedework" != "" ] ; then
382           cd $QUICKSTART_HOME
383       bedework=
384           return
385         fi
386        
387         if [ "$monitor" != "" ] ; then
388           cd $QUICKSTART_HOME/MonitorApp
389       monitor=
390           return
391         fi
392        
393         if [ "$naming" != "" ] ; then
394           cd $QUICKSTART_HOME/bwnaming
395       naming=
396           return
397         fi
398        
399         if [ "$exchgGateway" != "" ] ; then
400           cd $QUICKSTART_HOME/exchgGateway
401       exchgGateway=
402           return
403         fi
404
405         if [ "$synch" != "" ] ; then
406           cd $QUICKSTART_HOME/synch
407       synch=
408           return
409         fi
410        
411         if [ "$testsuite" != "" ] ; then
412           cd $QUICKSTART_HOME/testsuite
413       testsuite=
414           return
415         fi
416        
417         if [ "$tzsvr" != "" ] ; then
418           cd $QUICKSTART_HOME/bwtzsvr
419       tzsvr=
420           return
421         fi
422        
423         if [ "$bwtools" != "" ] ; then
424           cd $QUICKSTART_HOME/bwtools
425       bwtools=
426           return
427         fi
428
429 # Nothing left to do
430     echo "Finished at $(date)" 
431         exit 0;
432 }
433
434 # ----------------------------------------------------------------------------
435 # Build zoneinfo - require -version -tzdata
436 # tzdata file can be obtained via http://www.twinsun.com/tz/tz-link.htm or
437 # more directly from ftp://elsie.nci.nih.gov/pub/
438 # The version parameter value should be the version code from the tzdata name
439 # ----------------------------------------------------------------------------
440 actionZoneinfo() {
441   bwtzsvr="$QUICKSTART_HOME/bwtzsvr"
442   bwresources="$bwtzsvr/resources"
443
444   rm -rf /tmp/bedework
445   mkdir /tmp/bedework
446   mkdir /tmp/bedework/timezones
447   mkdir /tmp/bedework/timezones/data
448  
449   cd /tmp/bedework/timezones
450  
451   shift
452  
453   if [ "$1" = "-fetch" ] ; then
454     shift
455     cd data
456     wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
457     gzip -dc tzdata*.tar.gz | tar -xf -
458    
459     filename=$(basename `ls tzdata*`)
460     version=$( echo $filename | cut -c 7-11 )
461    
462     tzdata="/tmp/bedework/timezones/data/$filename"
463    
464     cd ..
465    
466     echo version=$version
467     echo tzdata=$tzdata
468   else
469     if [ "$1" != "-version" ] ; then
470       echo "got $1"
471       echo "Must supply -version parameter for -zoneinfo"
472       usageZoneinfo
473     fi
474    
475     shift
476
477     echo "got $1"
478     version=$1
479
480     shift
481    
482     if [ "$1" != "-tzdata" ] ; then
483       echo "Must supply -tzdata parameter for -zoneinfo"
484       usageZoneinfo
485     fi
486    
487     shift
488
489     tzdata=$1
490
491     shift
492   fi
493  
494   wget http://bedework.org/downloads/lib/vzic-1.3.tgz
495   gunzip vzic-1.3.tgz
496   tar -xf vzic-1.3.tar
497
498 # copy and unpack the data
499   mkdir olsondata
500   cd olsondata
501   cp $tzdata tzdata.tar.gz
502   gunzip tzdata.tar.gz
503   tar -xf tzdata.tar
504   rm tzdata.tar
505   cd ..
506  
507 # Replace lines in the makefile. Sure real unix types can do better 
508  
509   cd vzic-1.3
510  
511   sed "s/\(^OLSON_DIR = \)\(..*$\)/\1\/tmp\/bedework\/timezones\/olsondata/" Makefile > Makefile1
512
513   sed "s/\(^PRODUCT_ID = \)\(..*$\)/\1\/bedework.org\/\/NONSGML Bedework\/\/EN/" Makefile1 > Makefile2
514
515   sed "s/\(^TZID_PREFIX = \)\(..*$\)/\1/" Makefile2 > Makefile
516  
517   make
518  
519 # omit the pure for allegedly better outlook compatability -
520 # but not altogether correct timezones 
521   ./vzic --pure
522
523   cd ..
524  
525   mkdir tzdata
526   cp -r vzic-1.3/zoneinfo tzdata
527   cp $bwresources/aliases.txt tzdata
528  
529   cd tzdata
530  
531   echo "version=$version" > info.txt
532 #  date +buildTime=%D-%T-%N >> info.txt
533   date --utc +buildTime=%Y%m%dT%H%M%SZ >> info.txt
534  
535   zip -r tzdata *
536  
537   cp tzdata.zip $bwtzsvr/dist
538  
539   echo ""
540   echo "------------------------------------------------------------------------------"
541   echo "tzdata.zip has been built and is at $bwtzsvr/dist/tzdata.zip"
542   echo "------------------------------------------------------------------------------"
543   echo ""
544  
545   exit 0
546 }
547
548 if [ -z "$JAVA_HOME" -o ! -d "$JAVA_HOME" ] ; then
549   errorUsage "JAVA_HOME is not defined correctly for bedework."
550 fi
551
552 saveddir=`pwd`
553
554 trap 'cd $saveddir' 0
555 trap "exit 2" 1 2 3 15
556
557 export QUICKSTART_HOME=$saveddir
558
559 CLASSPATH=$ANT_HOME/lib/ant-launcher.jar
560 CLASSPATH=$CLASSPATH:$QUICKSTART_HOME/bedework/build/quickstart/antlib
561
562 # Default some parameters
563
564 BWCONFIGS=
565 bwc=default
566 BWCONFIG=
567 offline=
568 quickstart=
569
570 action=
571
572 if [ "$1" = "" ] ; then
573   usage
574   exit 1
575 fi
576
577 # look for actions first
578
579 if [ "$1" = "-updateall" ] ; then
580   actionUpdateall
581 fi
582
583 if [ "$1" = "-zoneinfo" ] ; then
584   actionZoneinfo $*
585 fi
586
587 if [ "$1" = "-buildwebcache" ] ; then
588   cd $QUICKSTART_HOME/cachedfeeder
589   ./buildWebCache
590   exit
591 fi
592
593 if [ "$1" = "-deploywebcache" ] ; then
594   cd $QUICKSTART_HOME/cachedfeeder
595   $JAVA_HOME/bin/java -classpath $CLASSPATH $ant_xmllogfile -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher \
596                  $BWCONFIG $ant_listener $ant_logger $ant_loglevel $bw_loglevel deploy-webcache
597   exit
598 fi
599
600 if [ "$1" = "-deployurlbuilder" ] ; then
601   cd $QUICKSTART_HOME/cachedfeeder
602   $JAVA_HOME/bin/java -classpath $CLASSPATH $ant_xmllogfile -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher \
603                  $BWCONFIG $ant_listener $ant_logger $ant_loglevel $bw_loglevel deploy-urlbuilder
604   exit
605 fi
606
607 # ----------------------------------------------------------------------------
608 #  Here we go through looking for arguments.
609
610 #  Look firther down for wher we are specifying projects to build. I've
611 #  not tried specifying more than one but I think it would work.
612
613 #  There's a hidden default project "bedework" which you get if you don't specify
614 #  any of the below projects. That gets turned off by each of them  with
615 #        pkgdefault=
616 #  Each also turns on it's own project build and any dependencies it has.
617 #  Further up in this file is where we build each project that has been turned
618 #  on. That processing is done in dependency order. Of course this whole process
619 #  fails if we ever build in a circular dependency - that's why it's important to
620 #  do a clean build fairly regularly. So as an example
621 #   -webdav)
622 #      webdav="yes"
623 #
624 #      access="yes"
625 #      bwxml="yes"
626 #      rpiutil="yes"
627 #      pkgdefault=
628 #  Turns on the webdav build and also access, bwxml and rpiutil because it depends
629 #  on them.
630 # ----------------------------------------------------------------------------
631
632 while [ "$1" != "" ]
633 do
634   # Process the next arg
635   case $1       # Look at $1
636   in
637     -bwchome)         # Define location of configs
638       shift
639       BWCONFIGS="$1"
640       shift
641       ;;
642     -quickstart)
643       quickstart="yes"
644       shift
645       ;;
646     -usage | -help | -? | ?)
647       usage
648       exit
649       shift
650       ;;
651     -bwc)
652       shift
653       bwc="$1"
654       shift
655       ;;
656     -offline)
657       offline="-Dorg.bedework.offline.build=yes"
658       shift
659       ;;
660 # ----------------------- Log level       
661     -log-silent)
662       ant_loglevel="-quiet"
663       bw_loglevel="-Dorg.bedework.build.silent=true"
664       shift
665       ;;
666     -log-quiet)
667       ant_loglevel="-quiet"
668       bw_loglevel=""
669       shift
670       ;;
671     -log-inform)
672       ant_loglevel=""
673       bw_loglevel="-Dorg.bedework.build.inform=true"
674       shift
675       ;;
676     -log-verbose)
677       ant_loglevel="-verbose"
678       bw_loglevel="-Dorg.bedework.build.inform=true -Dorg.bedework.build.noisy=true"
679       shift
680       ;;
681     -log-configs)
682       bw_loglevel="$bw_loglevel -Dorg.bedework.build.showconfigs=true"
683       shift
684       ;;
685     -ant-debug)
686       ant_loglevel="-debug"
687       shift
688       ;;
689     -build-debug)
690       bw_loglevel="-Dorg.bedework.build.inform=true -Dorg.bedework.build.noisy=true -Dorg.bedework.build.debug=true "
691       shift
692       ;;
693 # ------------------------Special targets
694     deploylog4j)
695           deploylog4j="yes"
696       pkgdefault=
697       shift
698       ;;
699         dirstart)
700           dirstart="yes"
701       pkgdefault=
702       shift
703       ;;
704 # ------------------------Projects
705     -access)
706       access="yes"
707      
708       bwxml="yes"
709       rpiutil="yes"
710       pkgdefault=
711       shift
712       ;;
713     -bwann)
714       bwannotations="yes"
715       pkgdefault=
716       shift
717       ;;
718     -bwcaldav)
719       bwcaldav="yes"
720      
721       access="yes"
722       bwannotations="yes" 
723       bwcalfacade="yes"
724       bwicalendar="yes"
725       bwinterfaces="yes"
726 #      bwmisc="yes"
727       bwsysevents="yes"
728       bwxml="yes"
729       caldav="yes"
730 #      davutil="yes"
731       rpiutil="yes"
732       webdav="yes"
733       pkgdefault=
734       shift
735       ;;
736     -bwcalcore)
737       bwcalcore="yes"
738      
739       access="yes"
740       bwannotations="yes" 
741       bwcalfacade="yes"
742       bwicalendar="yes"
743       bwinterfaces="yes"
744       bwmisc="yes"
745       bwsysevents="yes"
746       bwxml="yes"
747       caldav="yes"
748       davutil="yes"
749       rpiutil="yes"
750       webdav="yes"
751       pkgdefault=
752       shift
753       ;;
754     -bwcalfacade)
755       bwcalfacade="yes"
756    
757       access="yes"
758       bwannotations="yes"
759       bwxml="yes"
760       caldav="yes"
761       davutil="yes"
762       rpiutil="yes"
763       webdav="yes"
764       pkgdefault=
765       shift
766       ;;
767     -bwicalendar)
768       bwicalendar="yes"
769    
770       bwannotations="yes"
771       bwcalfacade="yes"
772       bwxml="yes"
773      
774       pkgdefault=
775       shift
776       ;;
777     -bwinterfaces)
778       bwinterfaces="yes"
779    
780       access="yes"
781       bwannotations="yes"
782       bwcalfacade="yes"
783       bwxml="yes"
784       caldav="yes"
785       davutil="yes"
786       rpiutil="yes"
787       webdav="yes"
788      
789       pkgdefault=
790       shift
791       ;;
792     -bwmisc)
793       bwmisc="yes"
794      
795       bwannotations="yes" 
796       bwcalfacade="yes"
797       bwicalendar="yes"
798       davutil="yes"
799       pkgdefault=
800       shift
801       ;;
802     -bwsysevents)
803       bwsysevents="yes"
804      
805       bwinterfaces="yes"
806       pkgdefault=
807       shift
808       ;;
809     -bwtools)
810       bwtools="yes"
811      
812       bwannotations="yes" 
813       bwcalfacade="yes"
814       bwinterfaces="yes"
815       bwxml="yes"
816       rpiutil="yes"
817       pkgdefault=
818       shift
819       ;;
820     -bwwebapps)
821       bwwebapps="yes"
822      
823       access="yes"
824       bwannotations="yes" 
825       bwcalfacade="yes"
826       bwicalendar="yes"
827       bwinterfaces="yes"
828       bwxml="yes"
829       caldav="yes"
830       davutil="yes"
831       rpiutil="yes"
832       webdav="yes"
833       pkgdefault=
834       shift
835       ;;
836     -bwxml)
837       bwxml="yes"
838       pkgdefault=
839       shift
840       ;;
841     -caldav)
842       caldav="yes"
843
844       access="yes"
845       bwxml="yes"
846       rpiutil="yes"
847       webdav="yes"
848       pkgdefault=
849       shift
850       ;;
851     -caldavTest)
852       caldavTest="yes"
853
854       access="yes"
855       bwxml="yes"
856       rpiutil="yes"
857       webdav="yes"
858       pkgdefault=
859       shift
860       ;;
861     -carddav)
862       carddav="yes"
863
864       access="yes"
865       bwxml="yes"
866       davutil="yes"
867       rpiutil="yes"
868       webdav="yes"
869       pkgdefault=
870       shift
871       ;;
872     -catsvr)
873       catsvr="yes"
874
875       access="yes"
876       bwxml="yes"
877       rpiutil="yes"
878       webdav="yes"
879       pkgdefault=
880       shift
881       ;;
882     -client)
883       client="yes"
884       pkgdefault=
885       shift
886       ;;
887     -davutil)
888       davutil="yes"
889
890       bwxml="yes"
891       rpiutil="yes"
892       pkgdefault=
893       shift
894       ;;
895     -deployutil)
896       bwdeployutil="yes"
897
898       pkgdefault=
899       shift
900       ;;
901     -dumprestore)
902       dumprestore="yes"
903      
904       access="yes"
905       bwannotations="yes" 
906       bwcalcore="yes"   
907       bwcalfacade="yes"
908       bwicalendar="yes"
909       bwinterfaces="yes"
910       bwmisc="yes"
911       bwsysevents="yes"
912       indexer="yes"
913       rpiutil="yes"
914       pkgdefault=
915       shift
916       ;;
917     -indexer)
918       indexer="yes"
919      
920       access="yes"
921       bwannotations="yes" 
922       bwcalcore="yes"   
923       bwcalfacade="yes"
924       bwicalendar="yes"
925       bwinterfaces="yes"
926       bwmisc="yes"
927       bwsysevents="yes"
928       rpiutil="yes"
929       pkgdefault=
930       shift
931       ;;
932     -monitor)
933       monitor="yes"
934       pkgdefault=
935       shift
936       ;;
937     -naming)
938       naming="yes"
939       pkgdefault=
940       shift
941       ;;
942     -rpiutil)
943       rpiutil="yes"
944
945       bwxml="yes"
946       pkgdefault=
947       shift
948       ;;
949     -exchgGateway)
950       exchgGateway="yes"
951      
952 #      access="yes"
953       bwxml="yes"
954 #      davutil="yes"
955 #      rpiutil="yes"
956       pkgdefault=
957       shift
958       ;;
959     -synch)
960       synch="yes"
961      
962       access="yes"
963       bwxml="yes"
964       davutil="yes"
965       rpiutil="yes"
966       pkgdefault=
967       shift
968       ;;
969     -testsuite)
970       testsuite="yes"
971      
972       pkgdefault="yes"
973       shift
974       ;;
975     -tzsvr)
976       tzsvr="yes"
977       bwxml="yes"
978       rpiutil="yes"
979       pkgdefault=
980       shift
981       ;;
982     -webdav)
983       webdav="yes"
984
985       access="yes"
986       bwxml="yes"
987       rpiutil="yes"
988       pkgdefault=
989       shift
990       ;;
991     -*)
992       usage
993       exit 1
994       ;;
995     *)
996       # Assume we've reached the target(s)
997       break
998       ;;
999   esac
1000 done
1001
1002 if [ "$pkgdefault" = "yes" ] ; then
1003   bedework="yes"
1004
1005   access="yes"
1006   bwannotations="yes" 
1007   bwcalcore="yes"   
1008   bwcaldav="yes"   
1009   bwcalfacade="yes"
1010   bwicalendar="yes"
1011   bwinterfaces="yes"
1012   bwmisc="yes"
1013   bwsysevents="yes"
1014   bwwebapps="yes"
1015   bwxml="yes"
1016   caldav="yes"
1017   davutil="yes"
1018   dumprestore="yes"
1019   indexer="yes"
1020   rpiutil="yes"
1021   webdav="yes"
1022 fi
1023
1024 if [ "$quickstart" != "" ] ; then
1025   if [ "$BWCONFIGS" != "" ] ; then
1026     errorUsage "Cannot specify both -quickstart and -bwchome"
1027   fi
1028   if [ "$bwc" = "jboss" ] ; then
1029         errorUsage "The jboss configuration has been removed from the quickstart.  It is now the default.  Remove the '-bwc jboss' option."
1030   fi
1031
1032   BWCONFIGS=$QUICKSTART_HOME/bedework/config/bwbuild
1033 elif [ "$BWCONFIGS" = "" ] ; then
1034   BWCONFIGS=$HOME/bwbuild
1035 fi
1036
1037 export BEDEWORK_CONFIGS_HOME=$BWCONFIGS
1038 export BEDEWORK_CONFIG=$BWCONFIGS/$bwc
1039
1040 if [ ! -d "$BEDEWORK_CONFIGS_HOME/.platform" ] ; then
1041   errorUsage "Configurations directory $BEDEWORK_CONFIGS_HOME is missing directory '.platform'."
1042 fi
1043
1044 if [ ! -d "$BEDEWORK_CONFIGS_HOME/.defaults" ] ; then
1045   errorUsage "Configurations directory $BEDEWORK_CONFIGS_HOME is missing directory '.defaults'."
1046 fi
1047
1048 if [ ! -f "$BEDEWORK_CONFIG/build.properties" ] ; then
1049   errorUsage "Configuration $BEDEWORK_CONFIG does not exist or is not a bedework configuration."
1050 fi
1051
1052 # Make available for ant
1053 export BWCONFIG="-Dorg.bedework.build.properties=$BEDEWORK_CONFIG/build.properties"
1054
1055 echo "BWCONFIGS=$BWCONFIGS"
1056 echo "BWCONFIG=$BWCONFIG"
1057
1058 javacmd="$JAVA_HOME/bin/java -classpath $CLASSPATH"
1059 # Build (of bwxml) blew up with permgen error
1060 javacmd="$javacmd -Xmx512M -XX:MaxPermSize=512M"
1061
1062 javacmd="$javacmd $ant_xmllogfile $offline"
1063 javacmd="$javacmd -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher"
1064 javacmd="$javacmd $BWCONFIG"
1065 javacmd="$javacmd $ant_listener $ant_logger $ant_loglevel $bw_loglevel"
1066
1067 while true
1068 do
1069   setDirectory
1070  
1071   if [ "$specialTarget" != "" ] ; then
1072     $javacmd $specialTarget
1073   else 
1074 #    echo $javacmd $*
1075     $javacmd $*
1076   fi
1077 done
1078  
Note: See TracBrowser for help on using the browser.