root/trunk/build/quickstart/linux/bw

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

Add processing of license data and a NOTICE file

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